(firedrake) simone@simone:~/firedrake/src/firedrake$ make alltest Building extension modules Linting firedrake codebase Linting firedrake test suite Linting firedrake scripts Running all regression tests ============================================================== test session starts ============================================================== platform linux -- Python 3.6.8, pytest-4.6.3, py-1.8.0, pluggy-0.12.0 rootdir: /home/simone/firedrake/src/firedrake, inifile: setup.cfg plugins: xdist-1.29.0, forked-1.0.2 collected 5540 items tests/test_0init.py ... [ 0%] tests/test_tsfc_interface.py .......... [ 0%] tests/benchmarks/test_assembly_overheads.py sssssssssssssssssssssssss [ 0%] tests/benchmarks/test_solver_overheads.py ssssssssssss [ 0%] tests/demos/test_demos_run.py .................... [ 1%] tests/equation_bcs/test_equation_bcs.py .......... [ 1%] tests/extrusion/test_2d_cohomology.py ...... [ 1%] tests/extrusion/test_annulus.py .. [ 1%] tests/extrusion/test_assembly.py ................................................................ [ 2%] tests/extrusion/test_bcs_interior_facet.py .. [ 2%] tests/extrusion/test_cellvolume_extrusion.py ................... [ 3%] tests/extrusion/test_cylinder.py .... [ 3%] tests/extrusion/test_dg_coords.py .. [ 3%] tests/extrusion/test_embedded_sphere_extrusion.py ........ [ 3%] tests/extrusion/test_enrichment_1_feec.py ......... [ 3%] tests/extrusion/test_extruded_cell_subdomains.py ...... [ 3%] tests/extrusion/test_facet_avg_extruded.py ...... [ 3%] tests/extrusion/test_facet_integrals_2D.py ....... [ 3%] tests/extrusion/test_facet_integrals_3D.py ....... [ 4%] tests/extrusion/test_facet_support_dofs.py ....... [ 4%] tests/extrusion/test_fs_abbreviations.py ............................................ [ 4%] tests/extrusion/test_galerkinproj.py ........................... [ 5%] tests/extrusion/test_geometric_strong_bcs_extrusion.py ................................ [ 5%] tests/extrusion/test_helmholtz_scalar.py ...... [ 6%] tests/extrusion/test_helmholtz_vector.py ........ [ 6%] tests/extrusion/test_identity_extrusion.py ................................................................................ [ 7%] tests/extrusion/test_interior_facets_extr.py ........ [ 7%] tests/extrusion/test_interval.py ... [ 7%] tests/extrusion/test_kernel_int_cube.py . [ 7%] tests/extrusion/test_kernel_int_p0.py . [ 7%] tests/extrusion/test_kernel_intas_p0.py . [ 7%] tests/extrusion/test_kernel_intrhs.py . [ 7%] tests/extrusion/test_kernel_intvar_p0.py . [ 7%] tests/extrusion/test_laplace_neumann.py .......... [ 8%] tests/extrusion/test_meshes.py ...... [ 8%] tests/extrusion/test_mixed_bcs.py ..............FF [ 8%] tests/extrusion/test_mixed_mats_extrusion.py ....... [ 8%] tests/extrusion/test_offset_computation.py .... [ 8%] tests/extrusion/test_point_eval_cells_extrusion.py ........... [ 8%] tests/extrusion/test_point_eval_fs_extrusion.py .................. [ 9%] tests/extrusion/test_poisson_neumann.py ...... [ 9%] tests/extrusion/test_poisson_strong_bcs_extrusion.py .. [ 9%] tests/extrusion/test_real_tensorproduct.py ................ [ 9%] tests/extrusion/test_rhs_bcs.py .. [ 9%] tests/extrusion/test_rhs_side_bcs.py .. [ 9%] tests/extrusion/test_side_strong_bcs.py ....... [ 9%] tests/extrusion/test_steady_advection_2D_extr.py ........ [ 10%] tests/extrusion/test_steady_advection_3D_extr.py ............ [ 10%] tests/extrusion/test_strong_bcs_caching.py .. [ 10%] tests/extrusion/test_subdomain_extruded.py .. [ 10%] tests/extrusion/test_trace_extr.py .... [ 10%] tests/extrusion/test_two_step.py .. [ 10%] tests/extrusion/test_unit_square.py . [ 10%] tests/extrusion/test_variable_layers_bcs.py ............................ [ 10%] tests/extrusion/test_variable_layers_mesh_volume.py .. [ 11%] tests/extrusion/test_variable_layers_numbering.py ................... [ 11%] tests/extrusion/test_variable_layers_poisson.py . [ 11%] tests/extrusion/test_variable_layers_steady_advection.py . [ 11%] tests/extrusion/test_vfs_components.py . [ 11%] tests/extrusion/test_wedge_analytic.py .. [ 11%] tests/extrusion/test_zero_forms_extrusion.py . [ 11%] tests/extrusion/test_zero_integrand_extrusion.py . [ 11%] tests/multigrid/test_basics.py ........ [ 11%] tests/multigrid/test_custom_transfer.py ..... [ 11%] tests/multigrid/test_embedded_transfer.py ........FFFFFFFF [ 12%] tests/multigrid/test_grid_transfer.py ............FFF............FFF............FFF............FFF............FFF............FFF......... [ 13%] ...FFF............FFF............FFF............FFF............FFF............FFF............FFF............FFF [ 15%] tests/multigrid/test_invalid_transfers.py ... [ 15%] tests/multigrid/test_multi_space_transfer.py .. [ 15%] tests/multigrid/test_nested_split.py .. [ 15%] tests/multigrid/test_non_nested.py . [ 15%] tests/multigrid/test_poisson_gmg.py ...FFF [ 16%] tests/multigrid/test_refine_then_solve.py . [ 16%] tests/multigrid/test_two_poisson_gmg.py ...FFF [ 16%] tests/output/test_config_exist.py . [ 16%] tests/output/test_dumb_checkpoint.py ...FFF...FFFF....... [ 16%] tests/output/test_hdf5file_checkpoint.py ....FFF...FFF.... [ 16%] tests/output/test_one_dim_output.py ... [ 16%] tests/output/test_pvd_output.py ......FFFFFF.................................................. [ 18%] tests/output/test_two_dim_output.py .... [ 18%] tests/randomfunctiongen/test_randomfunction.py .......................................................................................... [ 19%] ......................................................................................................................................... [ 22%] ......................................................................................................................................... [ 24%] ......................................................FFF [ 25%] tests/randomfunctiongen/test_randomgen_compatibility.py ................................................................................. [ 27%] ......................................................................................................................................... [ 29%] ......................................................................................................................................... [ 32%] ......................................................................................................................................... [ 34%] ... [ 34%] tests/regression/test_2dcohomology.py ..................... [ 35%] tests/regression/test_adv_diff.py .F.F [ 35%] tests/regression/test_adv_diff_nonsplit.py .F.F [ 35%] tests/regression/test_appctx_cleanup.py . [ 35%] tests/regression/test_assemble.py .............................. [ 35%] tests/regression/test_assemble_inverse.py .... [ 35%] tests/regression/test_auxiliary_dm.py . [ 35%] tests/regression/test_bcs.py .............................................................................................F [ 37%] tests/regression/test_bubble.py ... [ 37%] tests/regression/test_cell_subdomains.py ...FFF [ 37%] tests/regression/test_cellcoordinate.py ...... [ 37%] tests/regression/test_cellorigin.py .... [ 37%] tests/regression/test_cellvolume.py ................. [ 38%] tests/regression/test_change_coordinates.py ..... [ 38%] tests/regression/test_circle_manifold.py ......... [ 38%] tests/regression/test_coarse_nullspace.py . [ 38%] tests/regression/test_coefficient_derivatives.py . [ 38%] tests/regression/test_conditional.py .... [ 38%] tests/regression/test_constant.py ................ [ 38%] tests/regression/test_coordinatederivative.py ..... [ 38%] tests/regression/test_custom_callbacks.py . [ 38%] tests/regression/test_custom_pc_python_pmat.py .. [ 38%] tests/regression/test_dg_advection.py .F.F [ 39%] tests/regression/test_embedded_sphere.py ........ [ 39%] tests/regression/test_ensembleparallelism.py FF.FF [ 39%] tests/regression/test_exodus_mesh.py FF [ 39%] tests/regression/test_expressions.py .................................................................................................... [ 41%] ......................................................................................................................................... [ 43%] ................................................................ [ 44%] tests/regression/test_facet_avg.py ......... [ 44%] tests/regression/test_facet_elements.py . [ 44%] tests/regression/test_facet_normal.py .... [ 44%] tests/regression/test_facet_orientation.py ..... [ 45%] tests/regression/test_facets.py ............................................ [ 45%] tests/regression/test_fas_snespatch.py FF [ 45%] tests/regression/test_fs_caching.py ................ [ 46%] tests/regression/test_function.py ......... [ 46%] tests/regression/test_function_spaces.py ................................... [ 46%] tests/regression/test_geometric_strong_bcs.py ................................ [ 47%] tests/regression/test_helmholtz.py .F.....F [ 47%] tests/regression/test_helmholtz_bernstein.py ............ [ 47%] tests/regression/test_helmholtz_mixed.py .... [ 47%] tests/regression/test_helmholtz_nonlinear_diffusion.py .F.F [ 48%] tests/regression/test_helmholtz_sphere.py ........F [ 48%] tests/regression/test_helmholtz_zany.py ...... [ 48%] tests/regression/test_hyperelasticity.py . [ 48%] tests/regression/test_identity.py ....FFFF [ 48%] tests/regression/test_import_applications.py ss [ 48%] tests/regression/test_info.py . [ 48%] tests/regression/test_interior_elements.py . [ 48%] tests/regression/test_interior_facets.py .F....... [ 48%] tests/regression/test_interpolate.py ............. [ 48%] tests/regression/test_interpolate_zany.py ........ [ 49%] tests/regression/test_ip_viscosity.py .......... [ 49%] tests/regression/test_jacobian_invalidation.py . [ 49%] tests/regression/test_linear_solver_change_bc.py . [ 49%] tests/regression/test_locate_cell.py .................... [ 49%] tests/regression/test_manifolds.py ..FF...... [ 49%] tests/regression/test_manual_quadrature.py . [ 49%] tests/regression/test_matrix.py . [ 49%] tests/regression/test_matrix_free.py .........................................FFFFFFFFFFFFF [ 50%] tests/regression/test_matrix_prefix.py ...... [ 50%] tests/regression/test_mesh_generation.py ..........F.F...FFFFFFF.F........F.F......FFFFFF......FFFFFF......FFFFFF..F.... [ 52%] tests/regression/test_mesh_overlaps.py FFFFFFFFF [ 52%] tests/regression/test_mixed_interior_facets.py .... [ 52%] tests/regression/test_mixed_mats.py ........ [ 52%] tests/regression/test_mixed_tensor.py . [ 52%] tests/regression/test_moore_spence.py F [ 52%] tests/regression/test_multiple_domains.py .................x..x..x..x..x..x..x..x. [ 53%] tests/regression/test_nested_fieldsplit_solves.py ........FF [ 53%] tests/regression/test_nonlinear_helmholtz.py FFF [ 53%] tests/regression/test_nonlinear_stokes_hdiv.py F [ 53%] tests/regression/test_norm.py FFFF... [ 53%] tests/regression/test_nullspace.py FFFF.FFF [ 54%] tests/regression/test_octahedral_hemisphere.py FFFFFF [ 54%] tests/regression/test_p1pc.py FFF [ 54%] tests/regression/test_par_loops.py F.FFFF.FFF.FFFFF [ 54%] tests/regression/test_parallel_cr.py F [ 54%] tests/regression/test_parallel_kernel.py F [ 54%] tests/regression/test_parameters.py .. [ 54%] tests/regression/test_partially_mixed_mat.py FFFF [ 54%] tests/regression/test_patch_pc.py F.F.FFFFFF..FFFFF.FFFFFF [ 55%] tests/regression/test_patch_precompute_element_tensors.py . [ 55%] tests/regression/test_periodic_2d.py FFFFFFFFFFFF [ 55%] tests/regression/test_periodic_interval_advection.py FFFFFFFF [ 55%] tests/regression/test_periodic_rectangle_advection.py FFFFFFFFFFFFF [ 55%] tests/regression/test_piola_mixed_fn.py FF [ 55%] tests/regression/test_point_eval_api.py FFFFFF [ 55%] tests/regression/test_point_eval_cells.py FFFFFFFFF... [ 56%] tests/regression/test_point_eval_fs.py FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 56%] tests/regression/test_poisson_mixed_no_bcs.py FFF [ 56%] tests/regression/test_poisson_mixed_strong_bcs.py FFFFFFF [ 56%] tests/regression/test_poisson_sphere.py FFFFFF [ 56%] tests/regression/test_poisson_strong_bcs.py FFFFFFFFFFFFFFFFF [ 57%] tests/regression/test_poisson_strong_bcs_nitsche.py FFFF [ 57%] tests/regression/test_projection.py FFFFFFFFFFFFFFFFFFFFFFFF...FFFFFFFFF [ 57%] tests/regression/test_projection_zany.py FFFF [ 58%] tests/regression/test_python_parloop.py FFFFF [ 58%] tests/regression/test_quadrature.py F [ 58%] tests/regression/test_real_space.py .FFFFF.FFF.F.F [ 58%] tests/regression/test_scaled_mass.py FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 60%] FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 62%] FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 65%] FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 67%] FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 70%] FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 70%] tests/regression/test_slepc.py sF [ 70%] tests/regression/test_solver_error_checking.py .......FFF. [ 71%] tests/regression/test_solvers_options_prefix.py EEE......F. [ 71%] tests/regression/test_solving_interface.py .FFFF.FF. [ 71%] tests/regression/test_split.py F.F [ 71%] tests/regression/test_split_communicators.py F [ 71%] tests/regression/test_steady_advection_2D.py FFFFFFFF [ 71%] tests/regression/test_steady_advection_3D.py FFFF [ 71%] tests/regression/test_stokes_hdiv_parallel.py FFFFFF [ 71%] tests/regression/test_stokes_mini.py FF [ 71%] tests/regression/test_subdomain.py FFFFFF [ 71%] tests/regression/test_subdomain_integrals.py FFFFFFFF [ 72%] tests/regression/test_taylor.py F [ 72%] tests/regression/test_tensor_algebra.py FFFFFFFFFFFFFFFFFFFFF [ 72%] tests/regression/test_trace_galerkin_projection.py FFFFFFFFFFFF [ 72%] tests/regression/test_ufl.py FFFFFFFFF [ 72%] tests/regression/test_upwind_flux.py FFFF [ 72%] tests/regression/test_vector.py EEEEEFEEEEEEEF [ 73%] tests/regression/test_vector_laplace_on_quadrilaterals.py FFFF [ 73%] tests/regression/test_vertex_based_limiter.py EEEEEEEEEF [ 73%] tests/regression/test_vfs_component_bcs.py FFFFFFFFFFFFFFFF......FFFFF [ 73%] tests/regression/test_work_functions.py .....F..F [ 74%] tests/regression/test_zero_forms.py FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 75%] FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 78%] FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 80%] FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 83%] FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 85%] FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 88%] FFFFFFFFFFFFFFFFFFFF [ 88%] tests/regression/test_zero_integrand.py F [ 88%] tests/slate/test_assemble_tensors.py EEEFEEEFEEEFEEEFEEEFEEEFEEEFEEEFEEEFEEEFEEEFEEEFEEEFEEEFEEEFEEEFFFFFF.FFFFFFF.FF [ 90%] tests/slate/test_darcy_hybridized_mixed.py FF [ 90%] tests/slate/test_facet_tensors.py FFFFFF [ 90%] tests/slate/test_facet_tensors_extr.py EEEEEEEEEEEEEEEEEE [ 90%] tests/slate/test_hdg_poisson.py FFFF [ 90%] tests/slate/test_hybrid_poisson_sphere.py FF [ 90%] tests/slate/test_linear_algebra.py FFFFFFFFFFFFFFFFFFFFF [ 91%] tests/slate/test_matrix_free_hybridization.py F [ 91%] tests/slate/test_mimetic.py FFFFFFFFFFFFFF [ 91%] tests/slate/test_orientations.py FFF [ 91%] tests/slate/test_scalar_tensors.py FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 93%] FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 93%] tests/slate/test_scalar_tensors_extr.py F [ 93%] tests/slate/test_slac.py ................................................ [ 94%] tests/slate/test_slac_parallel.py F [ 94%] tests/slate/test_slate_hybridization.py FFFF [ 94%] tests/slate/test_slate_hybridization_extr.py FF [ 94%] tests/slate/test_slate_hybridized_mixed_bcs.py FFFFFF [ 95%] tests/slate/test_slate_infrastructure.py EEE.EEEEEE.EEEEEEEEE.EEEEEE.EEEE.EEEEE.EEEEEE.EEEE.EEEE.EEEE.EEEEEE.EEE.F.... [ 96%] tests/slate/test_subdomains.py FFFFFFFFFFFFFFFFEEEEEEEEEEF [ 96%] tests/slate/test_unaryop_precedence.py F [ 96%] tests/slate/test_variational_prb.py FF [ 97%] tests/slate/test_zany_element_tensors.py FFFF [ 97%] tests/supermesh/test_assemble_mixed_mass_matrix.py ....FF.FF...FFFFFF.FF.FF.FFFFFFFFFFF....FF.FF...FFFFFF.FF.FF.FFFFFFFFFFF [ 98%] tests/supermesh/test_galerkin_projection.py FFFFFFFFFFFFFFFFFFsssssssssFFFFFFFFFFFFFFFFFFsssssssss [ 99%] tests/supermesh/test_intersection_finder_nested.py ... [ 99%] tests/supermesh/test_nonnested_project.py FFFFFFFFFFFFFFFFFFFFFF [ 99%] tests/supermesh/test_nonnested_project_no_hierarchy.py FFFFFFFFFFF [100%] ==================================================================== ERRORS ===================================================================== ___________________________________________ ERROR at setup of test_linear_solver_options_prefix[None] ___________________________________________ a = Form([Integral(Product(Argument(WithGeometry(FunctionSpace(, Fin...1, None)), 'cell', Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34912), 'everywhere', {}, None)]) prefix = None, parameters = {'ksp_type': 'cg', 'pc_type': 'jacobi'} @pytest.fixture def ls(a, prefix, parameters): > A = assemble(a) tests/regression/test_solvers_options_prefix.py:71: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_linear_solver_options_prefix[] _____________________________________________ a = Form([Integral(Product(Argument(WithGeometry(FunctionSpace(, Fin...1, None)), 'cell', Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34914), 'everywhere', {}, None)]) prefix = '', parameters = {'ksp_type': 'cg', 'pc_type': 'jacobi'} @pytest.fixture def ls(a, prefix, parameters): > A = assemble(a) tests/regression/test_solvers_options_prefix.py:71: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ ERROR at setup of test_linear_solver_options_prefix[foo_] ___________________________________________ a = Form([Integral(Product(Argument(WithGeometry(FunctionSpace(, Fin...1, None)), 'cell', Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34916), 'everywhere', {}, None)]) prefix = 'foo_', parameters = {'ksp_type': 'cg', 'pc_type': 'jacobi'} @pytest.fixture def ls(a, prefix, parameters): > A = assemble(a) tests/regression/test_solvers_options_prefix.py:71: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________________ ERROR at setup of test_vector_array ______________________________________________________ @pytest.fixture def f(): mesh = UnitIntervalMesh(2) V = FunctionSpace(mesh, "CG", 1) f = Function(V) > f.interpolate(Constant(1)) tests/regression/test_vector.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________ ERROR at setup of test_vector_setitem _____________________________________________________ @pytest.fixture def f(): mesh = UnitIntervalMesh(2) V = FunctionSpace(mesh, "CG", 1) f = Function(V) > f.interpolate(Constant(1)) tests/regression/test_vector.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________ ERROR at setup of test_vector_getitem _____________________________________________________ @pytest.fixture def f(): mesh = UnitIntervalMesh(2) V = FunctionSpace(mesh, "CG", 1) f = Function(V) > f.interpolate(Constant(1)) tests/regression/test_vector.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________ ERROR at setup of test_vector_len _______________________________________________________ @pytest.fixture def f(): mesh = UnitIntervalMesh(2) V = FunctionSpace(mesh, "CG", 1) f = Function(V) > f.interpolate(Constant(1)) tests/regression/test_vector.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ ERROR at setup of test_vector_returns_copy ___________________________________________________ @pytest.fixture def f(): mesh = UnitIntervalMesh(2) V = FunctionSpace(mesh, "CG", 1) f = Function(V) > f.interpolate(Constant(1)) tests/regression/test_vector.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ ERROR at setup of test_vector_gather_works ___________________________________________________ @pytest.fixture def f(): mesh = UnitIntervalMesh(2) V = FunctionSpace(mesh, "CG", 1) f = Function(V) > f.interpolate(Constant(1)) tests/regression/test_vector.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ ERROR at setup of test_axpy __________________________________________________________ @pytest.fixture def f(): mesh = UnitIntervalMesh(2) V = FunctionSpace(mesh, "CG", 1) f = Function(V) > f.interpolate(Constant(1)) tests/regression/test_vector.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________________ ERROR at setup of test_addition ________________________________________________________ @pytest.fixture def f(): mesh = UnitIntervalMesh(2) V = FunctionSpace(mesh, "CG", 1) f = Function(V) > f.interpolate(Constant(1)) tests/regression/test_vector.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ ERROR at setup of test_iadd __________________________________________________________ @pytest.fixture def f(): mesh = UnitIntervalMesh(2) V = FunctionSpace(mesh, "CG", 1) f = Function(V) > f.interpolate(Constant(1)) tests/regression/test_vector.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________________ ERROR at setup of test_subtraction _______________________________________________________ @pytest.fixture def f(): mesh = UnitIntervalMesh(2) V = FunctionSpace(mesh, "CG", 1) f = Function(V) > f.interpolate(Constant(1)) tests/regression/test_vector.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ ERROR at setup of test_isub __________________________________________________________ @pytest.fixture def f(): mesh = UnitIntervalMesh(2) V = FunctionSpace(mesh, "CG", 1) f = Function(V) > f.interpolate(Constant(1)) tests/regression/test_vector.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________________ ERROR at setup of test_scale __________________________________________________________ @pytest.fixture def f(): mesh = UnitIntervalMesh(2) V = FunctionSpace(mesh, "CG", 1) f = Function(V) > f.interpolate(Constant(1)) tests/regression/test_vector.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ ERROR at setup of test_constant_field[periodic-interval] ____________________________________________ request = > @pytest.fixture(params=["periodic-interval", "periodic-square-tri", "periodic-square-quad"]) def mesh(request): if request.param == "periodic-interval": > return PeriodicUnitIntervalMesh(30) tests/regression/test_vertex_based_limiter.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/utility_meshes.py:149: in PeriodicUnitIntervalMesh return PeriodicIntervalMesh(ncells, length=1.0, distribution_parameters=distribution_parameters, comm=comm) firedrake/utility_meshes.py:137: in PeriodicIntervalMesh is_loopy_kernel=True) firedrake/parloops.py:348: in par_loop return pyop2.par_loop(*op2args, **kwargs) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ ERROR at setup of test_constant_field[periodic-square-tri] ___________________________________________ request = > @pytest.fixture(params=["periodic-interval", "periodic-square-tri", "periodic-square-quad"]) def mesh(request): if request.param == "periodic-interval": return PeriodicUnitIntervalMesh(30) elif request.param == "periodic-square-tri": > return PeriodicUnitSquareMesh(30, 30) tests/regression/test_vertex_based_limiter.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/utility_meshes.py:608: in PeriodicUnitSquareMesh comm=comm) firedrake/utility_meshes.py:579: in PeriodicSquareMesh comm=comm) firedrake/utility_meshes.py:547: in PeriodicRectangleMesh is_loopy_kernel=True) firedrake/parloops.py:348: in par_loop return pyop2.par_loop(*op2args, **kwargs) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ ERROR at setup of test_constant_field[periodic-square-quad] __________________________________________ request = > @pytest.fixture(params=["periodic-interval", "periodic-square-tri", "periodic-square-quad"]) def mesh(request): if request.param == "periodic-interval": return PeriodicUnitIntervalMesh(30) elif request.param == "periodic-square-tri": return PeriodicUnitSquareMesh(30, 30) elif request.param == "periodic-square-quad": > return PeriodicUnitSquareMesh(30, 30, quadrilateral=True) tests/regression/test_vertex_based_limiter.py:16: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/utility_meshes.py:608: in PeriodicUnitSquareMesh comm=comm) firedrake/utility_meshes.py:579: in PeriodicSquareMesh comm=comm) firedrake/utility_meshes.py:547: in PeriodicRectangleMesh is_loopy_kernel=True) firedrake/parloops.py:348: in par_loop return pyop2.par_loop(*op2args, **kwargs) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ ERROR at setup of test_step_function_bounds[periodic-interval] _________________________________________ request = > @pytest.fixture(params=["periodic-interval", "periodic-square-tri", "periodic-square-quad"]) def mesh(request): if request.param == "periodic-interval": > return PeriodicUnitIntervalMesh(30) tests/regression/test_vertex_based_limiter.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/utility_meshes.py:149: in PeriodicUnitIntervalMesh return PeriodicIntervalMesh(ncells, length=1.0, distribution_parameters=distribution_parameters, comm=comm) firedrake/utility_meshes.py:137: in PeriodicIntervalMesh is_loopy_kernel=True) firedrake/parloops.py:348: in par_loop return pyop2.par_loop(*op2args, **kwargs) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ ERROR at setup of test_step_function_bounds[periodic-square-tri] ________________________________________ request = > @pytest.fixture(params=["periodic-interval", "periodic-square-tri", "periodic-square-quad"]) def mesh(request): if request.param == "periodic-interval": return PeriodicUnitIntervalMesh(30) elif request.param == "periodic-square-tri": > return PeriodicUnitSquareMesh(30, 30) tests/regression/test_vertex_based_limiter.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/utility_meshes.py:608: in PeriodicUnitSquareMesh comm=comm) firedrake/utility_meshes.py:579: in PeriodicSquareMesh comm=comm) firedrake/utility_meshes.py:547: in PeriodicRectangleMesh is_loopy_kernel=True) firedrake/parloops.py:348: in par_loop return pyop2.par_loop(*op2args, **kwargs) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ ERROR at setup of test_step_function_bounds[periodic-square-quad] _______________________________________ request = > @pytest.fixture(params=["periodic-interval", "periodic-square-tri", "periodic-square-quad"]) def mesh(request): if request.param == "periodic-interval": return PeriodicUnitIntervalMesh(30) elif request.param == "periodic-square-tri": return PeriodicUnitSquareMesh(30, 30) elif request.param == "periodic-square-quad": > return PeriodicUnitSquareMesh(30, 30, quadrilateral=True) tests/regression/test_vertex_based_limiter.py:16: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/utility_meshes.py:608: in PeriodicUnitSquareMesh comm=comm) firedrake/utility_meshes.py:579: in PeriodicSquareMesh comm=comm) firedrake/utility_meshes.py:547: in PeriodicRectangleMesh is_loopy_kernel=True) firedrake/parloops.py:348: in par_loop return pyop2.par_loop(*op2args, **kwargs) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ ERROR at setup of test_step_function_loop[periodic-interval] __________________________________________ request = > @pytest.fixture(params=["periodic-interval", "periodic-square-tri", "periodic-square-quad"]) def mesh(request): if request.param == "periodic-interval": > return PeriodicUnitIntervalMesh(30) tests/regression/test_vertex_based_limiter.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/utility_meshes.py:149: in PeriodicUnitIntervalMesh return PeriodicIntervalMesh(ncells, length=1.0, distribution_parameters=distribution_parameters, comm=comm) firedrake/utility_meshes.py:137: in PeriodicIntervalMesh is_loopy_kernel=True) firedrake/parloops.py:348: in par_loop return pyop2.par_loop(*op2args, **kwargs) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ ERROR at setup of test_step_function_loop[periodic-square-tri] _________________________________________ request = > @pytest.fixture(params=["periodic-interval", "periodic-square-tri", "periodic-square-quad"]) def mesh(request): if request.param == "periodic-interval": return PeriodicUnitIntervalMesh(30) elif request.param == "periodic-square-tri": > return PeriodicUnitSquareMesh(30, 30) tests/regression/test_vertex_based_limiter.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/utility_meshes.py:608: in PeriodicUnitSquareMesh comm=comm) firedrake/utility_meshes.py:579: in PeriodicSquareMesh comm=comm) firedrake/utility_meshes.py:547: in PeriodicRectangleMesh is_loopy_kernel=True) firedrake/parloops.py:348: in par_loop return pyop2.par_loop(*op2args, **kwargs) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ ERROR at setup of test_step_function_loop[periodic-square-quad] ________________________________________ request = > @pytest.fixture(params=["periodic-interval", "periodic-square-tri", "periodic-square-quad"]) def mesh(request): if request.param == "periodic-interval": return PeriodicUnitIntervalMesh(30) elif request.param == "periodic-square-tri": return PeriodicUnitSquareMesh(30, 30) elif request.param == "periodic-square-quad": > return PeriodicUnitSquareMesh(30, 30, quadrilateral=True) tests/regression/test_vertex_based_limiter.py:16: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/utility_meshes.py:608: in PeriodicUnitSquareMesh comm=comm) firedrake/utility_meshes.py:579: in PeriodicSquareMesh comm=comm) firedrake/utility_meshes.py:547: in PeriodicRectangleMesh is_loopy_kernel=True) firedrake/parloops.py:348: in par_loop return pyop2.par_loop(*op2args, **kwargs) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ ERROR at setup of test_tensor_action[cg1-False] ________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36333)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] for j in range(fs_i.rank)])) else: > fi.interpolate(x[0]*x[1]) tests/slate/test_assemble_tensors.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_sum_tensor_actions[cg1-False] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36333)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] for j in range(fs_i.rank)])) else: > fi.interpolate(x[0]*x[1]) tests/slate/test_assemble_tensors.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ ERROR at setup of test_assemble_vector[cg1-False] _______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36333)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] for j in range(fs_i.rank)])) else: > fi.interpolate(x[0]*x[1]) tests/slate/test_assemble_tensors.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ ERROR at setup of test_tensor_action[cg1-True] _________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Q', quadrilateral, 1), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36341)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] for j in range(fs_i.rank)])) else: > fi.interpolate(x[0]*x[1]) tests/slate/test_assemble_tensors.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ ERROR at setup of test_sum_tensor_actions[cg1-True] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Q', quadrilateral, 1), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36341)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] for j in range(fs_i.rank)])) else: > fi.interpolate(x[0]*x[1]) tests/slate/test_assemble_tensors.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ ERROR at setup of test_assemble_vector[cg1-True] ________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Q', quadrilateral, 1), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36341)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] for j in range(fs_i.rank)])) else: > fi.interpolate(x[0]*x[1]) tests/slate/test_assemble_tensors.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ ERROR at setup of test_tensor_action[cg2-True] _________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Q', quadrilateral, 2), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36341)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] for j in range(fs_i.rank)])) else: > fi.interpolate(x[0]*x[1]) tests/slate/test_assemble_tensors.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ ERROR at setup of test_sum_tensor_actions[cg2-True] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Q', quadrilateral, 2), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36341)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] for j in range(fs_i.rank)])) else: > fi.interpolate(x[0]*x[1]) tests/slate/test_assemble_tensors.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ ERROR at setup of test_assemble_vector[cg2-True] ________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Q', quadrilateral, 2), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36341)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] for j in range(fs_i.rank)])) else: > fi.interpolate(x[0]*x[1]) tests/slate/test_assemble_tensors.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ ERROR at setup of test_tensor_action[cg2-False] ________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', triangle, 2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36355)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] for j in range(fs_i.rank)])) else: > fi.interpolate(x[0]*x[1]) tests/slate/test_assemble_tensors.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_sum_tensor_actions[cg2-False] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', triangle, 2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36355)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] for j in range(fs_i.rank)])) else: > fi.interpolate(x[0]*x[1]) tests/slate/test_assemble_tensors.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ ERROR at setup of test_assemble_vector[cg2-False] _______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', triangle, 2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36355)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] for j in range(fs_i.rank)])) else: > fi.interpolate(x[0]*x[1]) tests/slate/test_assemble_tensors.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ ERROR at setup of test_tensor_action[dg0-True] _________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('DQ', quadrilateral, 0), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36363)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] for j in range(fs_i.rank)])) else: > fi.interpolate(x[0]*x[1]) tests/slate/test_assemble_tensors.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ ERROR at setup of test_sum_tensor_actions[dg0-True] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('DQ', quadrilateral, 0), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36363)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] for j in range(fs_i.rank)])) else: > fi.interpolate(x[0]*x[1]) tests/slate/test_assemble_tensors.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ ERROR at setup of test_assemble_vector[dg0-True] ________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('DQ', quadrilateral, 0), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36363)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] for j in range(fs_i.rank)])) else: > fi.interpolate(x[0]*x[1]) tests/slate/test_assemble_tensors.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ ERROR at setup of test_tensor_action[dg0-False] ________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', triangle, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36371)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] for j in range(fs_i.rank)])) else: > fi.interpolate(x[0]*x[1]) tests/slate/test_assemble_tensors.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_sum_tensor_actions[dg0-False] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', triangle, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36371)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] for j in range(fs_i.rank)])) else: > fi.interpolate(x[0]*x[1]) tests/slate/test_assemble_tensors.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ ERROR at setup of test_assemble_vector[dg0-False] _______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', triangle, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36371)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] for j in range(fs_i.rank)])) else: > fi.interpolate(x[0]*x[1]) tests/slate/test_assemble_tensors.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ ERROR at setup of test_tensor_action[dg1-True] _________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('DQ', quadrilateral, 1), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36379)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] for j in range(fs_i.rank)])) else: > fi.interpolate(x[0]*x[1]) tests/slate/test_assemble_tensors.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ ERROR at setup of test_sum_tensor_actions[dg1-True] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('DQ', quadrilateral, 1), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36379)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] for j in range(fs_i.rank)])) else: > fi.interpolate(x[0]*x[1]) tests/slate/test_assemble_tensors.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ ERROR at setup of test_assemble_vector[dg1-True] ________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('DQ', quadrilateral, 1), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36379)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] for j in range(fs_i.rank)])) else: > fi.interpolate(x[0]*x[1]) tests/slate/test_assemble_tensors.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ ERROR at setup of test_tensor_action[dg1-False] ________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36387)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] for j in range(fs_i.rank)])) else: > fi.interpolate(x[0]*x[1]) tests/slate/test_assemble_tensors.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_sum_tensor_actions[dg1-False] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36387)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] for j in range(fs_i.rank)])) else: > fi.interpolate(x[0]*x[1]) tests/slate/test_assemble_tensors.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ ERROR at setup of test_assemble_vector[dg1-False] _______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36387)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] for j in range(fs_i.rank)])) else: > fi.interpolate(x[0]*x[1]) tests/slate/test_assemble_tensors.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ ERROR at setup of test_tensor_action[vcg1-True] ________________________________________________ function_space = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36395)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: > fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) tests/slate/test_assemble_tensors.py:46: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_sum_tensor_actions[vcg1-True] ______________________________________________ function_space = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36395)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: > fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) tests/slate/test_assemble_tensors.py:46: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ ERROR at setup of test_assemble_vector[vcg1-True] _______________________________________________ function_space = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36395)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: > fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) tests/slate/test_assemble_tensors.py:46: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ ERROR at setup of test_tensor_action[vcg1-False] ________________________________________________ function_space = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36403)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: > fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) tests/slate/test_assemble_tensors.py:46: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_sum_tensor_actions[vcg1-False] _____________________________________________ function_space = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36403)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: > fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) tests/slate/test_assemble_tensors.py:46: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ ERROR at setup of test_assemble_vector[vcg1-False] _______________________________________________ function_space = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36403)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: > fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) tests/slate/test_assemble_tensors.py:46: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ ERROR at setup of test_tensor_action[vcg2-True] ________________________________________________ function_space = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Q', quadrilateral, 2), dim=2), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36411)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: > fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) tests/slate/test_assemble_tensors.py:46: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_sum_tensor_actions[vcg2-True] ______________________________________________ function_space = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Q', quadrilateral, 2), dim=2), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36411)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: > fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) tests/slate/test_assemble_tensors.py:46: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ ERROR at setup of test_assemble_vector[vcg2-True] _______________________________________________ function_space = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Q', quadrilateral, 2), dim=2), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36411)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: > fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) tests/slate/test_assemble_tensors.py:46: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ ERROR at setup of test_tensor_action[vcg2-False] ________________________________________________ function_space = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 2), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36419)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: > fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) tests/slate/test_assemble_tensors.py:46: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_sum_tensor_actions[vcg2-False] _____________________________________________ function_space = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 2), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36419)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: > fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) tests/slate/test_assemble_tensors.py:46: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ ERROR at setup of test_assemble_vector[vcg2-False] _______________________________________________ function_space = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 2), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36419)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: > fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) tests/slate/test_assemble_tensors.py:46: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ ERROR at setup of test_tensor_action[tcg1-True] ________________________________________________ function_space = WithGeometry(FunctionSpace(, TensorElement(FiniteElement('Q', qu...l, 1), shape=(2, 2), symmetry={}), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36427)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] > for j in range(fs_i.rank)])) tests/slate/test_assemble_tensors.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_sum_tensor_actions[tcg1-True] ______________________________________________ function_space = WithGeometry(FunctionSpace(, TensorElement(FiniteElement('Q', qu...l, 1), shape=(2, 2), symmetry={}), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36427)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] > for j in range(fs_i.rank)])) tests/slate/test_assemble_tensors.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ ERROR at setup of test_assemble_vector[tcg1-True] _______________________________________________ function_space = WithGeometry(FunctionSpace(, TensorElement(FiniteElement('Q', qu...l, 1), shape=(2, 2), symmetry={}), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36427)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] > for j in range(fs_i.rank)])) tests/slate/test_assemble_tensors.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ ERROR at setup of test_tensor_action[tcg1-False] ________________________________________________ function_space = WithGeometry(FunctionSpace(, TensorElement(FiniteElement('Lagran... 1), shape=(2, 2), symmetry={}), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36435)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] > for j in range(fs_i.rank)])) tests/slate/test_assemble_tensors.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_sum_tensor_actions[tcg1-False] _____________________________________________ function_space = WithGeometry(FunctionSpace(, TensorElement(FiniteElement('Lagran... 1), shape=(2, 2), symmetry={}), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36435)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] > for j in range(fs_i.rank)])) tests/slate/test_assemble_tensors.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ ERROR at setup of test_assemble_vector[tcg1-False] _______________________________________________ function_space = WithGeometry(FunctionSpace(, TensorElement(FiniteElement('Lagran... 1), shape=(2, 2), symmetry={}), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36435)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] > for j in range(fs_i.rank)])) tests/slate/test_assemble_tensors.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ ERROR at setup of test_tensor_action[tcg2-True] ________________________________________________ function_space = WithGeometry(FunctionSpace(, TensorElement(FiniteElement('Q', qu...l, 2), shape=(2, 2), symmetry={}), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36443)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] > for j in range(fs_i.rank)])) tests/slate/test_assemble_tensors.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_sum_tensor_actions[tcg2-True] ______________________________________________ function_space = WithGeometry(FunctionSpace(, TensorElement(FiniteElement('Q', qu...l, 2), shape=(2, 2), symmetry={}), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36443)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] > for j in range(fs_i.rank)])) tests/slate/test_assemble_tensors.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ ERROR at setup of test_assemble_vector[tcg2-True] _______________________________________________ function_space = WithGeometry(FunctionSpace(, TensorElement(FiniteElement('Q', qu...l, 2), shape=(2, 2), symmetry={}), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36443)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] > for j in range(fs_i.rank)])) tests/slate/test_assemble_tensors.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ ERROR at setup of test_tensor_action[tcg2-False] ________________________________________________ function_space = WithGeometry(FunctionSpace(, TensorElement(FiniteElement('Lagran... 2), shape=(2, 2), symmetry={}), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36451)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] > for j in range(fs_i.rank)])) tests/slate/test_assemble_tensors.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_sum_tensor_actions[tcg2-False] _____________________________________________ function_space = WithGeometry(FunctionSpace(, TensorElement(FiniteElement('Lagran... 2), shape=(2, 2), symmetry={}), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36451)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] > for j in range(fs_i.rank)])) tests/slate/test_assemble_tensors.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ ERROR at setup of test_assemble_vector[tcg2-False] _______________________________________________ function_space = WithGeometry(FunctionSpace(, TensorElement(FiniteElement('Lagran... 2), shape=(2, 2), symmetry={}), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36451)) @pytest.fixture def f(function_space): """Generate a Firedrake function given a particular function space.""" f = Function(function_space) f_split = f.split() x = SpatialCoordinate(function_space.mesh()) # NOTE: interpolation of UFL expressions into mixed # function spaces is not yet implemented for fi in f_split: fs_i = fi.function_space() if fs_i.rank == 1: fi.interpolate(as_vector((x[0]*x[1],) * fs_i.value_size)) elif fs_i.rank == 2: fi.interpolate(as_tensor([[x[0]*x[1] for i in range(fs_i.mesh().geometric_dimension())] > for j in range(fs_i.rank)])) tests/slate/test_assemble_tensors.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ ERROR at setup of test_horiz_facet_interior_jump[False] ____________________________________________ request = > @pytest.fixture(scope='module', params=[False, True]) def mesh(request): m = UnitSquareMesh(2, 2, quadrilateral=request.param) > return ExtrudedMesh(m, layers=4, layer_height=0.25) tests/slate/test_facet_tensors_extr.py:9: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ ERROR at setup of test_horiz_facet_interior_avg[False] _____________________________________________ request = > @pytest.fixture(scope='module', params=[False, True]) def mesh(request): m = UnitSquareMesh(2, 2, quadrilateral=request.param) > return ExtrudedMesh(m, layers=4, layer_height=0.25) tests/slate/test_facet_tensors_extr.py:9: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ ERROR at setup of test_vert_facet_interior_jump[False] _____________________________________________ request = > @pytest.fixture(scope='module', params=[False, True]) def mesh(request): m = UnitSquareMesh(2, 2, quadrilateral=request.param) > return ExtrudedMesh(m, layers=4, layer_height=0.25) tests/slate/test_facet_tensors_extr.py:9: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_vert_facet_interior_avg[False] _____________________________________________ request = > @pytest.fixture(scope='module', params=[False, True]) def mesh(request): m = UnitSquareMesh(2, 2, quadrilateral=request.param) > return ExtrudedMesh(m, layers=4, layer_height=0.25) tests/slate/test_facet_tensors_extr.py:9: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ ERROR at setup of test_top_facet_exterior[False] ________________________________________________ request = > @pytest.fixture(scope='module', params=[False, True]) def mesh(request): m = UnitSquareMesh(2, 2, quadrilateral=request.param) > return ExtrudedMesh(m, layers=4, layer_height=0.25) tests/slate/test_facet_tensors_extr.py:9: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ ERROR at setup of test_bottom_facet_exterior[False] ______________________________________________ request = > @pytest.fixture(scope='module', params=[False, True]) def mesh(request): m = UnitSquareMesh(2, 2, quadrilateral=request.param) > return ExtrudedMesh(m, layers=4, layer_height=0.25) tests/slate/test_facet_tensors_extr.py:9: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ ERROR at setup of test_vert_facet_exterior[False] _______________________________________________ request = > @pytest.fixture(scope='module', params=[False, True]) def mesh(request): m = UnitSquareMesh(2, 2, quadrilateral=request.param) > return ExtrudedMesh(m, layers=4, layer_height=0.25) tests/slate/test_facet_tensors_extr.py:9: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ ERROR at setup of test_total_interior_avg[False] ________________________________________________ request = > @pytest.fixture(scope='module', params=[False, True]) def mesh(request): m = UnitSquareMesh(2, 2, quadrilateral=request.param) > return ExtrudedMesh(m, layers=4, layer_height=0.25) tests/slate/test_facet_tensors_extr.py:9: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________ ERROR at setup of test_total_facet[False] ___________________________________________________ request = > @pytest.fixture(scope='module', params=[False, True]) def mesh(request): m = UnitSquareMesh(2, 2, quadrilateral=request.param) > return ExtrudedMesh(m, layers=4, layer_height=0.25) tests/slate/test_facet_tensors_extr.py:9: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ ERROR at setup of test_horiz_facet_interior_jump[True] _____________________________________________ request = > @pytest.fixture(scope='module', params=[False, True]) def mesh(request): m = UnitSquareMesh(2, 2, quadrilateral=request.param) > return ExtrudedMesh(m, layers=4, layer_height=0.25) tests/slate/test_facet_tensors_extr.py:9: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_horiz_facet_interior_avg[True] _____________________________________________ request = > @pytest.fixture(scope='module', params=[False, True]) def mesh(request): m = UnitSquareMesh(2, 2, quadrilateral=request.param) > return ExtrudedMesh(m, layers=4, layer_height=0.25) tests/slate/test_facet_tensors_extr.py:9: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_vert_facet_interior_jump[True] _____________________________________________ request = > @pytest.fixture(scope='module', params=[False, True]) def mesh(request): m = UnitSquareMesh(2, 2, quadrilateral=request.param) > return ExtrudedMesh(m, layers=4, layer_height=0.25) tests/slate/test_facet_tensors_extr.py:9: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_vert_facet_interior_avg[True] ______________________________________________ request = > @pytest.fixture(scope='module', params=[False, True]) def mesh(request): m = UnitSquareMesh(2, 2, quadrilateral=request.param) > return ExtrudedMesh(m, layers=4, layer_height=0.25) tests/slate/test_facet_tensors_extr.py:9: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ ERROR at setup of test_top_facet_exterior[True] ________________________________________________ request = > @pytest.fixture(scope='module', params=[False, True]) def mesh(request): m = UnitSquareMesh(2, 2, quadrilateral=request.param) > return ExtrudedMesh(m, layers=4, layer_height=0.25) tests/slate/test_facet_tensors_extr.py:9: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ ERROR at setup of test_bottom_facet_exterior[True] _______________________________________________ request = > @pytest.fixture(scope='module', params=[False, True]) def mesh(request): m = UnitSquareMesh(2, 2, quadrilateral=request.param) > return ExtrudedMesh(m, layers=4, layer_height=0.25) tests/slate/test_facet_tensors_extr.py:9: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ ERROR at setup of test_vert_facet_exterior[True] ________________________________________________ request = > @pytest.fixture(scope='module', params=[False, True]) def mesh(request): m = UnitSquareMesh(2, 2, quadrilateral=request.param) > return ExtrudedMesh(m, layers=4, layer_height=0.25) tests/slate/test_facet_tensors_extr.py:9: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ ERROR at setup of test_total_interior_avg[True] ________________________________________________ request = > @pytest.fixture(scope='module', params=[False, True]) def mesh(request): m = UnitSquareMesh(2, 2, quadrilateral=request.param) > return ExtrudedMesh(m, layers=4, layer_height=0.25) tests/slate/test_facet_tensors_extr.py:9: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________ ERROR at setup of test_total_facet[True] ____________________________________________________ request = > @pytest.fixture(scope='module', params=[False, True]) def mesh(request): m = UnitSquareMesh(2, 2, quadrilateral=request.param) > return ExtrudedMesh(m, layers=4, layer_height=0.25) tests/slate/test_facet_tensors_extr.py:9: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ ERROR at setup of test_arguments[cg1-mesh0] __________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', interval, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 36811)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ ERROR at setup of test_coefficients[cg1-mesh0] _________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', interval, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 36811)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ ERROR at setup of test_integral_information[cg1-mesh0] _____________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', interval, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 36811)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_blocks[cg1-cg2-cg1-dg0-mesh0] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', interval, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 36811)) @pytest.fixture def zero_rank_tensor(function_space): c = Function(function_space) x = SpatialCoordinate(function_space.mesh()) if function_space.mesh().cell_dimension() == 1: > c.interpolate(x[0]*x[0]) tests/slate/test_slate_infrastructure.py:85: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_blocks[cg1-cg2-cg1-dg0-mesh1] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36818)) @pytest.fixture def zero_rank_tensor(function_space): c = Function(function_space) x = SpatialCoordinate(function_space.mesh()) if function_space.mesh().cell_dimension() == 1: c.interpolate(x[0]*x[0]) else: > c.interpolate(x[0]*x[1]) tests/slate/test_slate_infrastructure.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_blocks[cg2-cg2-cg1-dg0-mesh1] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', triangle, 2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36818)) @pytest.fixture def zero_rank_tensor(function_space): c = Function(function_space) x = SpatialCoordinate(function_space.mesh()) if function_space.mesh().cell_dimension() == 1: c.interpolate(x[0]*x[0]) else: > c.interpolate(x[0]*x[1]) tests/slate/test_slate_infrastructure.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ ERROR at setup of test_arguments[cg2-mesh1] __________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', triangle, 2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36818)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ ERROR at setup of test_coefficients[cg2-mesh1] _________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', triangle, 2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36818)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ ERROR at setup of test_integral_information[cg2-mesh1] _____________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', triangle, 2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36818)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_blocks[cg2-cg1-dg1-dg0-mesh1] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', triangle, 2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36818)) @pytest.fixture def zero_rank_tensor(function_space): c = Function(function_space) x = SpatialCoordinate(function_space.mesh()) if function_space.mesh().cell_dimension() == 1: c.interpolate(x[0]*x[0]) else: > c.interpolate(x[0]*x[1]) tests/slate/test_slate_infrastructure.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_blocks[cg2-cg1-dg1-dg0-mesh0] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', interval, 2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 36827)) @pytest.fixture def zero_rank_tensor(function_space): c = Function(function_space) x = SpatialCoordinate(function_space.mesh()) if function_space.mesh().cell_dimension() == 1: > c.interpolate(x[0]*x[0]) tests/slate/test_slate_infrastructure.py:85: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_blocks[cg2-cg1-dg1-dg0-mesh2] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Q', quadrilateral, 2), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36830)) @pytest.fixture def zero_rank_tensor(function_space): c = Function(function_space) x = SpatialCoordinate(function_space.mesh()) if function_space.mesh().cell_dimension() == 1: c.interpolate(x[0]*x[0]) else: > c.interpolate(x[0]*x[1]) tests/slate/test_slate_infrastructure.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_blocks[cg1-cg1-dg1-dg0-mesh2] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Q', quadrilateral, 1), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36830)) @pytest.fixture def zero_rank_tensor(function_space): c = Function(function_space) x = SpatialCoordinate(function_space.mesh()) if function_space.mesh().cell_dimension() == 1: c.interpolate(x[0]*x[0]) else: > c.interpolate(x[0]*x[1]) tests/slate/test_slate_infrastructure.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_blocks[dg0-cg1-dg1-dg0-mesh2] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('DQ', quadrilateral, 0), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36830)) @pytest.fixture def zero_rank_tensor(function_space): c = Function(function_space) x = SpatialCoordinate(function_space.mesh()) if function_space.mesh().cell_dimension() == 1: c.interpolate(x[0]*x[0]) else: > c.interpolate(x[0]*x[1]) tests/slate/test_slate_infrastructure.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_blocks[dg0-cg2-cg1-dg0-mesh2] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('DQ', quadrilateral, 0), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36830)) @pytest.fixture def zero_rank_tensor(function_space): c = Function(function_space) x = SpatialCoordinate(function_space.mesh()) if function_space.mesh().cell_dimension() == 1: c.interpolate(x[0]*x[0]) else: > c.interpolate(x[0]*x[1]) tests/slate/test_slate_infrastructure.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ ERROR at setup of test_arguments[dg0-mesh2] __________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('DQ', quadrilateral, 0), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36830)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ ERROR at setup of test_coefficients[dg0-mesh2] _________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('DQ', quadrilateral, 0), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36830)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ ERROR at setup of test_integral_information[dg0-mesh2] _____________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('DQ', quadrilateral, 0), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36830)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_blocks[dg0-cg1-dg1-dg0-mesh1] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', triangle, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36840)) @pytest.fixture def zero_rank_tensor(function_space): c = Function(function_space) x = SpatialCoordinate(function_space.mesh()) if function_space.mesh().cell_dimension() == 1: c.interpolate(x[0]*x[0]) else: > c.interpolate(x[0]*x[1]) tests/slate/test_slate_infrastructure.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_blocks[dg0-cg1-dg1-dg0-mesh0] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', interval, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 36843)) @pytest.fixture def zero_rank_tensor(function_space): c = Function(function_space) x = SpatialCoordinate(function_space.mesh()) if function_space.mesh().cell_dimension() == 1: > c.interpolate(x[0]*x[0]) tests/slate/test_slate_infrastructure.py:85: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_blocks[dg0-cg2-cg1-dg0-mesh1] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', triangle, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36846)) @pytest.fixture def zero_rank_tensor(function_space): c = Function(function_space) x = SpatialCoordinate(function_space.mesh()) if function_space.mesh().cell_dimension() == 1: c.interpolate(x[0]*x[0]) else: > c.interpolate(x[0]*x[1]) tests/slate/test_slate_infrastructure.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ ERROR at setup of test_arguments[dg0-mesh1] __________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', triangle, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36846)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ ERROR at setup of test_coefficients[dg0-mesh1] _________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', triangle, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36846)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ ERROR at setup of test_integral_information[dg0-mesh1] _____________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', triangle, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36846)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_blocks[dg0-cg2-cg1-dg0-mesh0] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', interval, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 36853)) @pytest.fixture def zero_rank_tensor(function_space): c = Function(function_space) x = SpatialCoordinate(function_space.mesh()) if function_space.mesh().cell_dimension() == 1: > c.interpolate(x[0]*x[0]) tests/slate/test_slate_infrastructure.py:85: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ ERROR at setup of test_arguments[dg0-mesh0] __________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', interval, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 36853)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ ERROR at setup of test_coefficients[dg0-mesh0] _________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', interval, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 36853)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ ERROR at setup of test_integral_information[dg0-mesh0] _____________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', interval, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 36853)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_blocks[dg1-cg1-dg1-dg0-mesh2] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('DQ', quadrilateral, 1), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36860)) @pytest.fixture def zero_rank_tensor(function_space): c = Function(function_space) x = SpatialCoordinate(function_space.mesh()) if function_space.mesh().cell_dimension() == 1: c.interpolate(x[0]*x[0]) else: > c.interpolate(x[0]*x[1]) tests/slate/test_slate_infrastructure.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_blocks[dg1-cg2-cg1-dg0-mesh2] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('DQ', quadrilateral, 1), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36860)) @pytest.fixture def zero_rank_tensor(function_space): c = Function(function_space) x = SpatialCoordinate(function_space.mesh()) if function_space.mesh().cell_dimension() == 1: c.interpolate(x[0]*x[0]) else: > c.interpolate(x[0]*x[1]) tests/slate/test_slate_infrastructure.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ ERROR at setup of test_arguments[dg1-mesh2] __________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('DQ', quadrilateral, 1), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36860)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ ERROR at setup of test_coefficients[dg1-mesh2] _________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('DQ', quadrilateral, 1), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36860)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ ERROR at setup of test_integral_information[dg1-mesh2] _____________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('DQ', quadrilateral, 1), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36860)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_blocks[dg1-cg1-dg1-dg0-mesh1] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36868)) @pytest.fixture def zero_rank_tensor(function_space): c = Function(function_space) x = SpatialCoordinate(function_space.mesh()) if function_space.mesh().cell_dimension() == 1: c.interpolate(x[0]*x[0]) else: > c.interpolate(x[0]*x[1]) tests/slate/test_slate_infrastructure.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_blocks[dg1-cg1-dg1-dg0-mesh0] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', interval, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 36871)) @pytest.fixture def zero_rank_tensor(function_space): c = Function(function_space) x = SpatialCoordinate(function_space.mesh()) if function_space.mesh().cell_dimension() == 1: > c.interpolate(x[0]*x[0]) tests/slate/test_slate_infrastructure.py:85: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_blocks[dg1-cg2-cg1-dg0-mesh1] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36874)) @pytest.fixture def zero_rank_tensor(function_space): c = Function(function_space) x = SpatialCoordinate(function_space.mesh()) if function_space.mesh().cell_dimension() == 1: c.interpolate(x[0]*x[0]) else: > c.interpolate(x[0]*x[1]) tests/slate/test_slate_infrastructure.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ ERROR at setup of test_arguments[dg1-mesh1] __________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36874)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ ERROR at setup of test_coefficients[dg1-mesh1] _________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36874)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ ERROR at setup of test_integral_information[dg1-mesh1] _____________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36874)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_blocks[dg1-cg2-cg1-dg0-mesh0] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', interval, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 36881)) @pytest.fixture def zero_rank_tensor(function_space): c = Function(function_space) x = SpatialCoordinate(function_space.mesh()) if function_space.mesh().cell_dimension() == 1: > c.interpolate(x[0]*x[0]) tests/slate/test_slate_infrastructure.py:85: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ ERROR at setup of test_arguments[dg1-mesh0] __________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', interval, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 36881)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ ERROR at setup of test_coefficients[dg1-mesh0] _________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', interval, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 36881)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ ERROR at setup of test_integral_information[dg1-mesh0] _____________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', interval, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 36881)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_blocks[cg2-cg2-cg1-dg0-mesh2] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Q', quadrilateral, 2), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36888)) @pytest.fixture def zero_rank_tensor(function_space): c = Function(function_space) x = SpatialCoordinate(function_space.mesh()) if function_space.mesh().cell_dimension() == 1: c.interpolate(x[0]*x[0]) else: > c.interpolate(x[0]*x[1]) tests/slate/test_slate_infrastructure.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ ERROR at setup of test_arguments[cg2-mesh2] __________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Q', quadrilateral, 2), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36888)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ ERROR at setup of test_coefficients[cg2-mesh2] _________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Q', quadrilateral, 2), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36888)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ ERROR at setup of test_integral_information[cg2-mesh2] _____________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Q', quadrilateral, 2), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36888)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_blocks[cg1-cg2-cg1-dg0-mesh2] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Q', quadrilateral, 1), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36888)) @pytest.fixture def zero_rank_tensor(function_space): c = Function(function_space) x = SpatialCoordinate(function_space.mesh()) if function_space.mesh().cell_dimension() == 1: c.interpolate(x[0]*x[0]) else: > c.interpolate(x[0]*x[1]) tests/slate/test_slate_infrastructure.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ ERROR at setup of test_arguments[cg1-mesh2] __________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Q', quadrilateral, 1), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36888)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ ERROR at setup of test_coefficients[cg1-mesh2] _________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Q', quadrilateral, 1), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36888)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ ERROR at setup of test_integral_information[cg1-mesh2] _____________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Q', quadrilateral, 1), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36888)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_blocks[cg1-cg1-dg1-dg0-mesh1] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36900)) @pytest.fixture def zero_rank_tensor(function_space): c = Function(function_space) x = SpatialCoordinate(function_space.mesh()) if function_space.mesh().cell_dimension() == 1: c.interpolate(x[0]*x[0]) else: > c.interpolate(x[0]*x[1]) tests/slate/test_slate_infrastructure.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_blocks[cg1-cg1-dg1-dg0-mesh0] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', interval, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 36903)) @pytest.fixture def zero_rank_tensor(function_space): c = Function(function_space) x = SpatialCoordinate(function_space.mesh()) if function_space.mesh().cell_dimension() == 1: > c.interpolate(x[0]*x[0]) tests/slate/test_slate_infrastructure.py:85: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_blocks[cg2-cg2-cg1-dg0-mesh0] ______________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', interval, 2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 36903)) @pytest.fixture def zero_rank_tensor(function_space): c = Function(function_space) x = SpatialCoordinate(function_space.mesh()) if function_space.mesh().cell_dimension() == 1: > c.interpolate(x[0]*x[0]) tests/slate/test_slate_infrastructure.py:85: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ ERROR at setup of test_arguments[cg2-mesh0] __________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', interval, 2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 36903)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ ERROR at setup of test_coefficients[cg2-mesh0] _________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', interval, 2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 36903)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ ERROR at setup of test_integral_information[cg2-mesh0] _____________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', interval, 2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 36903)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ ERROR at setup of test_arguments[cg1-mesh1] __________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36911)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ ERROR at setup of test_coefficients[cg1-mesh1] _________________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36911)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ ERROR at setup of test_integral_information[cg1-mesh1] _____________________________________________ function_space = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36911)) @pytest.fixture def load(function_space): f = Function(function_space) x = SpatialCoordinate(function_space.mesh()) > f.interpolate(cos(x[0])*math.pi*2) tests/slate/test_slate_infrastructure.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ ERROR at setup of test_extr_vert_facet_subdomains[False-1] ___________________________________________ request = > @pytest.fixture(scope='module', params=[False, True]) def mesh_extr(request): m = UnitSquareMesh(2, 2, quadrilateral=request.param) > return ExtrudedMesh(m, layers=4, layer_height=0.25) tests/slate/test_subdomains.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ ERROR at setup of test_extr_vert_facet_subdomains[False-2] ___________________________________________ request = > @pytest.fixture(scope='module', params=[False, True]) def mesh_extr(request): m = UnitSquareMesh(2, 2, quadrilateral=request.param) > return ExtrudedMesh(m, layers=4, layer_height=0.25) tests/slate/test_subdomains.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ ERROR at setup of test_extr_vert_facet_subdomains[False-3] ___________________________________________ request = > @pytest.fixture(scope='module', params=[False, True]) def mesh_extr(request): m = UnitSquareMesh(2, 2, quadrilateral=request.param) > return ExtrudedMesh(m, layers=4, layer_height=0.25) tests/slate/test_subdomains.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ ERROR at setup of test_extr_vert_facet_subdomains[False-4] ___________________________________________ request = > @pytest.fixture(scope='module', params=[False, True]) def mesh_extr(request): m = UnitSquareMesh(2, 2, quadrilateral=request.param) > return ExtrudedMesh(m, layers=4, layer_height=0.25) tests/slate/test_subdomains.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ ERROR at setup of test_multiple_subdomains_extr[False] _____________________________________________ request = > @pytest.fixture(scope='module', params=[False, True]) def mesh_extr(request): m = UnitSquareMesh(2, 2, quadrilateral=request.param) > return ExtrudedMesh(m, layers=4, layer_height=0.25) tests/slate/test_subdomains.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ ERROR at setup of test_extr_vert_facet_subdomains[True-1] ___________________________________________ request = > @pytest.fixture(scope='module', params=[False, True]) def mesh_extr(request): m = UnitSquareMesh(2, 2, quadrilateral=request.param) > return ExtrudedMesh(m, layers=4, layer_height=0.25) tests/slate/test_subdomains.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ ERROR at setup of test_extr_vert_facet_subdomains[True-2] ___________________________________________ request = > @pytest.fixture(scope='module', params=[False, True]) def mesh_extr(request): m = UnitSquareMesh(2, 2, quadrilateral=request.param) > return ExtrudedMesh(m, layers=4, layer_height=0.25) tests/slate/test_subdomains.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ ERROR at setup of test_extr_vert_facet_subdomains[True-3] ___________________________________________ request = > @pytest.fixture(scope='module', params=[False, True]) def mesh_extr(request): m = UnitSquareMesh(2, 2, quadrilateral=request.param) > return ExtrudedMesh(m, layers=4, layer_height=0.25) tests/slate/test_subdomains.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ ERROR at setup of test_extr_vert_facet_subdomains[True-4] ___________________________________________ request = > @pytest.fixture(scope='module', params=[False, True]) def mesh_extr(request): m = UnitSquareMesh(2, 2, quadrilateral=request.param) > return ExtrudedMesh(m, layers=4, layer_height=0.25) tests/slate/test_subdomains.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ ERROR at setup of test_multiple_subdomains_extr[True] _____________________________________________ request = > @pytest.fixture(scope='module', params=[False, True]) def mesh_extr(request): m = UnitSquareMesh(2, 2, quadrilateral=request.param) > return ExtrudedMesh(m, layers=4, layer_height=0.25) tests/slate/test_subdomains.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError =================================================================== FAILURES ==================================================================== _______________________________________________________ test_stokes_taylor_hood_parallel ________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...],), kwargs = {}, retcode = 59 cmd = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['mpiexec', '-n', '1', 'python', '-m', 'pytest', '--runxfail', '-s', '-q', '/home/simone/firedrake/src/firedrake/tests/extrusion/test_mixed_bcs.py::test_stokes_taylor_hood_parallel', ':', '-n', '2', 'python', '-m', 'pytest', '--runxfail', '--tb=no', '-q', '/home/simone/firedrake/src/firedrake/tests/extrusion/test_mixed_bcs.py::test_stokes_taylor_hood_parallel']' returned non-zero exit status 59. /usr/lib/python3.6/subprocess.py:311: CalledProcessError ------------------------------------------------------------- Captured stdout call -------------------------------------------------------------- -------------------------------------------------------------------------- MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD with errorcode 59. NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes. You may or may not see output from other processes, depending on exactly when Open MPI kills them. -------------------------------------------------------------------------- ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range [0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger [0]PETSC ERROR: or see http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind [0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS X to find memory corruption errors [0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run [0]PETSC ERROR: to get more information on the crash. [simone:05847] 2 more processes have sent help message help-mpi-api.txt / mpi-abort [simone:05847] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages __________________________________________________ test_stokes_taylor_hood_parallel_monolithic __________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...],), kwargs = {}, retcode = 59 cmd = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['mpiexec', '-n', '1', 'python', '-m', 'pytest', '--runxfail', '-s', '-q', '/home/simone/firedrake/src/firedrake/tests/extrusion/test_mixed_bcs.py::test_stokes_taylor_hood_parallel_monolithic', ':', '-n', '2', 'python', '-m', 'pytest', '--runxfail', '--tb=no', '-q', '/home/simone/firedrake/src/firedrake/tests/extrusion/test_mixed_bcs.py::test_stokes_taylor_hood_parallel_monolithic']' returned non-zero exit status 59. /usr/lib/python3.6/subprocess.py:311: CalledProcessError ------------------------------------------------------------- Captured stdout call -------------------------------------------------------------- -------------------------------------------------------------------------- MPI_ABORT was invoked on rank 2 in communicator MPI_COMM_WORLD with errorcode 59. NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes. You may or may not see output from other processes, depending on exactly when Open MPI kills them. -------------------------------------------------------------------------- ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: Caught signal number 15 Terminate: Some process (or the batch system) has told this process to end [0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger [0]PETSC ERROR: or see http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind [0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS X to find memory corruption errors [0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run [0]PETSC ERROR: to get more information on the crash. [simone:05903] 1 more process has sent help message help-mpi-api.txt / mpi-abort [simone:05903] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages ________________________________________________________ test_riesz_parallel[1-RT-Exact] ________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_riesz_parallel[1-RT-Fortin] ________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________ test_riesz_parallel[1-N1curl-Exact] ______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________________ test_riesz_parallel[1-N1curl-Fortin] ______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_riesz_parallel[2-RT-Exact] ________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_riesz_parallel[2-RT-Fortin] ________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________ test_riesz_parallel[2-N1curl-Exact] ______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________________ test_riesz_parallel[2-N1curl-Fortin] ______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________ test_grid_transfer_parallel[interval-1-injection] _______________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________ test_grid_transfer_parallel[interval-1-restriction] ______________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________ test_grid_transfer_parallel[interval-1-prolongation] ______________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________ test_grid_transfer_parallel[interval-2-injection] _______________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________ test_grid_transfer_parallel[interval-2-restriction] ______________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________ test_grid_transfer_parallel[interval-2-prolongation] ______________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________ test_grid_transfer_parallel[triangle-2-injection] _______________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________ test_grid_transfer_parallel[triangle-2-restriction] ______________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________ test_grid_transfer_parallel[triangle-2-prolongation] ______________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________ test_grid_transfer_parallel[triangle-1-injection] _______________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________ test_grid_transfer_parallel[triangle-1-restriction] ______________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________ test_grid_transfer_parallel[triangle-1-prolongation] ______________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________ test_grid_transfer_parallel[triangle-nonnested-2-injection] __________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________ test_grid_transfer_parallel[triangle-nonnested-2-restriction] _________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________ test_grid_transfer_parallel[triangle-nonnested-2-prolongation] _________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________ test_grid_transfer_parallel[triangle-nonnested-1-injection] __________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________ test_grid_transfer_parallel[triangle-nonnested-1-restriction] _________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________ test_grid_transfer_parallel[triangle-nonnested-1-prolongation] _________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________ test_grid_transfer_parallel[quadrilateral-2-injection] _____________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________ test_grid_transfer_parallel[quadrilateral-2-restriction] ____________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________ test_grid_transfer_parallel[quadrilateral-2-prolongation] ___________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________ test_grid_transfer_parallel[quadrilateral-1-injection] _____________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________ test_grid_transfer_parallel[quadrilateral-1-restriction] ____________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________ test_grid_transfer_parallel[quadrilateral-1-prolongation] ___________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________ test_grid_transfer_parallel[tetrahedron-2-injection] ______________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________ test_grid_transfer_parallel[tetrahedron-2-restriction] _____________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________ test_grid_transfer_parallel[tetrahedron-2-prolongation] ____________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________ test_grid_transfer_parallel[tetrahedron-1-injection] ______________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________ test_grid_transfer_parallel[tetrahedron-1-restriction] _____________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________ test_grid_transfer_parallel[tetrahedron-1-prolongation] ____________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________ test_grid_transfer_parallel[prism-2-injection] _________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________ test_grid_transfer_parallel[prism-2-restriction] ________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________ test_grid_transfer_parallel[prism-2-prolongation] _______________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________ test_grid_transfer_parallel[prism-1-injection] _________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________ test_grid_transfer_parallel[prism-1-restriction] ________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________ test_grid_transfer_parallel[prism-1-prolongation] _______________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________ test_grid_transfer_parallel[hexahedron-2-injection] ______________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________ test_grid_transfer_parallel[hexahedron-2-restriction] _____________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________ test_grid_transfer_parallel[hexahedron-2-prolongation] _____________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________ test_grid_transfer_parallel[hexahedron-1-injection] ______________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________ test_grid_transfer_parallel[hexahedron-1-restriction] _____________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________ test_grid_transfer_parallel[hexahedron-1-prolongation] _____________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________________ test_poisson_gmg_parallel_mg __________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________________ test_poisson_gmg_parallel_fas _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________ test_poisson_gmg_parallel_newtonfas ______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_two_poisson_gmg_parallel_mg ________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________________ test_two_poisson_gmg_parallel_splitmg _____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_two_poisson_gmg_parallel_fas _______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________ test_store_load_parallel[simplex-CG-1] _____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________ test_store_load_parallel[simplex-CG-2] _____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________ test_store_load_parallel[simplex-CG-3] _____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________ test_store_load_parallel[quad-CG-1] ______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________ test_store_load_parallel[quad-CG-2] ______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________ test_store_load_parallel[quad-CG-3] ______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________ test_serial_checkpoint_parallel_load_fails ___________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________ test_write_read_parallel[simplex-CG-1] _____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________ test_write_read_parallel[simplex-CG-2] _____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________ test_write_read_parallel[simplex-CG-3] _____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________ test_write_read_parallel[quad-CG-1] ______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________ test_write_read_parallel[quad-CG-2] ______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________ test_write_read_parallel[quad-CG-3] ______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________ test_can_save_coordinates_parallel[interval] __________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________ test_can_save_coordinates_parallel[square[tri]] ________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________ test_can_save_coordinates_parallel[square[quad]] ________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________ test_can_save_coordinates_parallel[tet] ____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________ test_can_save_coordinates_parallel[sphere[tri]] ________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________ test_can_save_coordinates_parallel[sphere[quad]] ________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_randomfunc_parallel_pcg64 _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________ test_randomfunc_parallel_philox_threefry[Philox] ________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________ test_randomfunc_parallel_philox_threefry[ThreeFry] _______________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________________ test_adv_diff_parallel _____________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________ test_adv_diff_on_quadrilaterals_parallel ____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________________ test_adv_diff_parallel _____________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________ test_adv_diff_on_quadrilaterals_parallel ____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_bc_nodes_cover_ghost_dofs _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________ test_subdomain_cell_integral_parallel[everywhere] _______________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________ test_subdomain_cell_integral_parallel[1] ____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________ test_subdomain_cell_integral_parallel[2] ____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________ test_dg_advection_icosahedral_sphere_parallel _________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________ test_dg_advection_cubed_sphere_parallel ____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________________ test_ensemble_allreduce ____________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________________________ test_ensemble_solvers _____________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_comm_manager_parallel ___________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_comm_manager_allreduce __________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________________________ test_create_from_file _____________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________________________ test_sidesets _________________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________________ test_snespatch[0] _______________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________________ test_snespatch[1] _______________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_firedrake_helmholtz_parallel _______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________ test_firedrake_helmholtz_on_quadrilateral_mesh_from_file_parallel _______________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________________________ test_l2_conv_parallel _____________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________ test_l2_conv_on_quadrilaterals_parallel ____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________ test_helmholtz_mixed_cubedsphere_parallel ___________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________________ test_identity_parallel _____________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________________ test_vector_identity_parallel _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________________ test_tensor_identity_parallel _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________ test_tensor_identity_nonstandard_shape_parallel ________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________ test_interior_facet_solve_parallel _______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________________ test_no_manifold_parallel ___________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________________ test_manifold_parallel _____________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________________ test_matrix_free_split_communicators ______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________ test_get_info[Poisson-scalar-local] ______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_get_info[Poisson-scalar-sum] _______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_get_info[Poisson-scalar-max] _______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________ test_get_info[Poisson-vector-local] ______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_get_info[Poisson-vector-sum] _______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_get_info[Poisson-vector-max] _______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_get_info[Mass-scalar-local] ________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_get_info[Mass-scalar-sum] _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_get_info[Mass-scalar-max] _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_get_info[Mass-vector-local] ________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_get_info[Mass-vector-sum] _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_get_info[Mass-vector-max] _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________ test_one_element_advection_parallel ______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_one_element_mesh_parallel _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_unit_interval_parallel __________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________________ test_interval_parallel _____________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________ test_periodic_unit_interval_parallel_np2 ____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________________ test_periodic_unit_interval_parallel ______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_periodic_interval_parallel ________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________________ test_unit_square_parallel ___________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________________ test_unit_cube_parallel ____________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________ test_icosahedral_sphere_mesh_num_exterior_facets_parallel ___________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________ test_octahedral_sphere_mesh_num_exterior_facets_parallel ____________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________ test_cubed_sphere_mesh_num_exterior_facets_parallel ______________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_bendy_icos_parallel[1] __________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_bendy_icos_parallel[2] __________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_bendy_icos_parallel[3] __________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_bendy_icos_unit_parallel[1] ________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_bendy_icos_unit_parallel[2] ________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_bendy_icos_unit_parallel[3] ________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_bendy_octa_parallel[1] __________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_bendy_octa_parallel[2] __________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_bendy_octa_parallel[3] __________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_bendy_octa_unit_parallel[1] ________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_bendy_octa_unit_parallel[2] ________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_bendy_octa_unit_parallel[3] ________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_bendy_cube_parallel[1] __________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_bendy_cube_parallel[2] __________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_bendy_cube_parallel[3] __________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_bendy_cube_unit_parallel[1] ________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_bendy_cube_unit_parallel[2] ________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_bendy_cube_unit_parallel[3] ________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________________ test_mesh_validation_parallel _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________________ test_overlap[flat-NONE] ____________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________________ test_overlap[flat-FACET] ____________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________________ test_overlap[flat-VERTEX] ___________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_overlap[refined-NONE] ___________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_overlap[refined-FACET] __________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________________ test_overlap[refined-VERTEX] __________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________ test_override_distribution_parameters[NONE] __________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________ test_override_distribution_parameters[FACET] __________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________ test_override_distribution_parameters[VERTEX] _________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________________ test_moore_spence _______________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________________ test_nested_fieldsplit_solve_parallel _____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________________ test_matrix_types _______________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form00_cell_integral_ot...Coordinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_9653'), 3, None, 'V_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d975528c8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('dcd53f9d712b593a802911790b7db401', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('dcd53f9d712b593a802911790b7db401', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 3, None), (, 3, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/39/52c967afb1ef183169adae45163ba4.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/39/52c967afb1ef183169adae45163ba4.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: W = WithGeometry(MixedFunctionSpace(IndexedProxyFunctionSpace(, Fini..., index=3, component=None), name='V_P_Q_R'), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 31983)) def test_matrix_types(W): a = inner(TestFunction(W), TrialFunction(W))*dx with pytest.raises(ValueError): assemble(a, mat_type="baij") A = assemble(a) > assert A.M.handle.getType() == parameters["default_matrix_type"] tests/regression/test_nested_fieldsplit_solves.py:157: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/matrix.py:133: in M self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________________________ test_l2_conv[params0] _____________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...nates'), Map(Set((128, 128, 128), 'Cells'), Set((81, 81, 81), 'set_9658'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d60df5378> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('13c0e6304c2ab34f73b3162279a2f3e7', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('13c0e6304c2ab34f73b3162279a2f3e7', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/69/ee868e58b76c18f912cdae78d2dd96.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/69/ee868e58b76c18f912cdae78d2dd96.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: params = {} @pytest.mark.parametrize('params', [{}, {'snes_type': 'ksponly', 'ksp_type': 'preonly', 'pc_type': 'lu'}]) def test_l2_conv(params): > assert (run_convergence_test(parameters=params) > 2.8).all() tests/regression/test_nonlinear_helmholtz.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_nonlinear_helmholtz.py:44: in run_convergence_test diff = np.array([run_test(i, parameters) for i in range(3, 6)]) tests/regression/test_nonlinear_helmholtz.py:44: in diff = np.array([run_test(i, parameters) for i in range(3, 6)]) tests/regression/test_nonlinear_helmholtz.py:39: in run_test return sqrt(assemble(dot(u - f, u - f) * dx)) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('a896a76f564f155bc7361b2a8228c494', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/4c/8d6ca662b8d129474735cd34f40b25.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________________________________ test_l2_conv[params1] _____________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...nates'), Map(Set((128, 128, 128), 'Cells'), Set((81, 81, 81), 'set_9663'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d54e1d950> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('13c0e6304c2ab34f73b3162279a2f3e7', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('13c0e6304c2ab34f73b3162279a2f3e7', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/69/ee868e58b76c18f912cdae78d2dd96.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/69/ee868e58b76c18f912cdae78d2dd96.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: params = {'ksp_type': 'preonly', 'pc_type': 'lu', 'snes_type': 'ksponly'} @pytest.mark.parametrize('params', [{}, {'snes_type': 'ksponly', 'ksp_type': 'preonly', 'pc_type': 'lu'}]) def test_l2_conv(params): > assert (run_convergence_test(parameters=params) > 2.8).all() tests/regression/test_nonlinear_helmholtz.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_nonlinear_helmholtz.py:44: in run_convergence_test diff = np.array([run_test(i, parameters) for i in range(3, 6)]) tests/regression/test_nonlinear_helmholtz.py:44: in diff = np.array([run_test(i, parameters) for i in range(3, 6)]) tests/regression/test_nonlinear_helmholtz.py:39: in run_test return sqrt(assemble(dot(u - f, u - f) * dx)) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('a896a76f564f155bc7361b2a8228c494', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/4c/8d6ca662b8d129474735cd34f40b25.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________________________________ test_l2_conv_parallel _____________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_nonlinear_stokes_hdiv ___________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...e_cell_node'), Access('READ')), Arg(Global((1,), array([0.1]), dtype('float64'), 'global_3080'), None, Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d62dce8c8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('ceafd6fe1e7f81b9e7be841f16d820e8', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('ceafd6fe1e7f81b9e7be841f16d820e8', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (1,)), None, False, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/5f/9570811434e3cc027ae4ac04fc39e2.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/5f/9570811434e3cc027ae4ac04fc39e2.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: def test_nonlinear_stokes_hdiv(): mesh = UnitSquareMesh(3, 3) Vc = mesh.coordinates.function_space() x, y = SpatialCoordinate(mesh) f = Function(Vc).interpolate(as_vector([x, y + (1 - y)*Constant(0.1)*sin(2*pi*x)])) mesh.coordinates.assign(f) V1 = FunctionSpace(mesh, "BDM", 1) V2 = FunctionSpace(mesh, "DG", 0) W = V1*V2 W = V1*V2 w = Function(W) dw = TestFunction(W) def g(u): beta = Constant(1.0) return 0.5*(beta + 10*inner(grad(u), grad(u)))**(1./6) def epsilon(u): return sym(grad(u)) u, p = split(w) v, q = split(dw) n = FacetNormal(mesh) h = CellSize(mesh) eta = Constant(30.) F = (inner(g(u)*epsilon(u), grad(v))*dx - p*div(v)*dx + q*div(u)*dx) def T(u): return u - inner(u, n)*n def N(u): return inner(u, n)*n F += (- inner(2*avg(outer(v, n)), avg(g(u)*epsilon(u)))*dS # Consistency - inner(2*avg(outer(u, n)), avg(g(u)*epsilon(v)))*dS # Symmetry + eta/avg(h)*inner(jump(u), jump(v))*dS) # Penalty # left = 1 - we enforce u.n strongly and u.t = 0 via penalty method # top = 4 # bottom = 3 # right = 2 (natural) # Penalty method for tangent component on left (delete these terms for slip) F += (- inner(g(u)*T(dot(epsilon(u), n)), T(v))*ds(1) - inner(g(u)*T(dot(epsilon(v), n)), T(u))*ds(1) + eta/h*inner(T(u), T(v))*ds(1)) # nothing on right-hand side (edge 2) # edge 3 (bottom) is now slip -- u.n=0 strongly and # Weertman-style sliding law through boundary integral mWeert = Constant(2.0) CWeert = Constant(1.0) # This is a hack to regularize the sliding law, which is nondifferentiable at 0 epsWeert = Constant(1.e-4) F += inner(CWeert**(-1.0/mWeert)*(inner(T(u), T(u))+epsWeert)**(0.5/mWeert-0.5)*T(u), T(v))*ds(3) # edge 4 also no slip (delete these terms for slip) F += (- inner(g(u)*T(dot(epsilon(u), n)), T(v))*ds(4) - inner(g(u)*T(dot(epsilon(v), n)), T(u))*ds(4) + eta/h*inner(T(u), T(v))*ds(4)) params = {'ksp_type': 'preonly', 'mat_type': 'aij', 'pc_type': 'lu', 'pc_factor_shift_type': 'inblocks', 'snes_linesearch_type': 'basic', 'snes_atol': 1.0e-8} # parabolic profile on edge 1 > bcfunc = Function(V1).project(as_vector([y*(1 - y), 0])) tests/regression/test_nonlinear_stokes_hdiv.py:86: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:158: in apply_massinv return self.solver.solve ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:144: in solver return firedrake.LinearSolver(self.A, solver_parameters=self.solver_parameters) firedrake/linear_solver.py:97: in __init__ self.A.force_evaluation() firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________________ test_p_norm[1] _________________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form_cell_integral_othe...on_32008'), Map(Set((10, 10, 10), 'Cells'), Set((11, 11, 11), 'set_9674'), 2, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d681ebe18> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('7322932a1ad9dc23449730358517e569', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('7322932a1ad9dc23449730358517e569', , False, False, False, , Access('INC'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/6d/b15cc84c3ee1c92b740b144727da36.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/6d/b15cc84c3ee1c92b740b144727da36.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: p = 1 x = Coefficient(WithGeometry(FunctionSpace(, FiniteElement('Lagrange', interval, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 32006)), 46310) @pytest.mark.parametrize("p", range(1, 5)) def test_p_norm(p, x): > assert numpy.allclose(norm(x, "L%d" % p), (1/(p+1))**(1/p)) tests/regression/test_norm.py:17: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/norms.py:77: in norm return assemble((expr**(p/2))*dx)**(1/p) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________________ test_p_norm[2] _________________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form_cell_integral_othe...on_32012'), Map(Set((10, 10, 10), 'Cells'), Set((11, 11, 11), 'set_9678'), 2, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d5de3f268> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('3a0c89572c7f66ef5e558361ca86d1ec', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('3a0c89572c7f66ef5e558361ca86d1ec', , False, False, False, , Access('INC'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/e2/9ea08299db5c54aec8a80efc519969.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/e2/9ea08299db5c54aec8a80efc519969.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: p = 2 x = Coefficient(WithGeometry(FunctionSpace(, FiniteElement('Lagrange', interval, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 32010)), 46319) @pytest.mark.parametrize("p", range(1, 5)) def test_p_norm(p, x): > assert numpy.allclose(norm(x, "L%d" % p), (1/(p+1))**(1/p)) tests/regression/test_norm.py:17: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/norms.py:77: in norm return assemble((expr**(p/2))*dx)**(1/p) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________________ test_p_norm[3] _________________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form_cell_integral_othe...on_32016'), Map(Set((10, 10, 10), 'Cells'), Set((11, 11, 11), 'set_9682'), 2, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d54e1d0d0> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('5a412e864d8bcf913d168d8f6b05dd12', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('5a412e864d8bcf913d168d8f6b05dd12', , False, False, False, , Access('INC'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/ad/461a6acf3c8920768e20114b36faa5.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/ad/461a6acf3c8920768e20114b36faa5.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: p = 3 x = Coefficient(WithGeometry(FunctionSpace(, FiniteElement('Lagrange', interval, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 32014)), 46328) @pytest.mark.parametrize("p", range(1, 5)) def test_p_norm(p, x): > assert numpy.allclose(norm(x, "L%d" % p), (1/(p+1))**(1/p)) tests/regression/test_norm.py:17: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/norms.py:77: in norm return assemble((expr**(p/2))*dx)**(1/p) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________________ test_p_norm[4] _________________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form_cell_integral_othe...on_32020'), Map(Set((10, 10, 10), 'Cells'), Set((11, 11, 11), 'set_9686'), 2, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d6878d378> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('965b362b79ac991a9a555fe366904e9d', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('965b362b79ac991a9a555fe366904e9d', , False, False, False, , Access('INC'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/ad/70195867d36be77666fd218a30a6f1.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/ad/70195867d36be77666fd218a30a6f1.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: p = 4 x = Coefficient(WithGeometry(FunctionSpace(, FiniteElement('Lagrange', interval, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 32018)), 46337) @pytest.mark.parametrize("p", range(1, 5)) def test_p_norm(p, x): > assert numpy.allclose(norm(x, "L%d" % p), (1/(p+1))**(1/p)) tests/regression/test_norm.py:17: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/norms.py:77: in norm return assemble((expr**(p/2))*dx)**(1/p) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________________________ test_nullspace[False] _____________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...), Map(Set((1250, 1250, 1250), 'Cells'), Set((676, 676, 676), 'set_9702'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d62dce510> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('5b02028abc9799b9c720ccc38536f578', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('5b02028abc9799b9c720ccc38536f578', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/18/2ba5c21cccef4dd39004f760b233a1.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/18/2ba5c21cccef4dd39004f760b233a1.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: V = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32031)) def test_nullspace(V): u = TrialFunction(V) v = TestFunction(V) x = SpatialCoordinate(V.mesh()) a = inner(grad(u), grad(v))*dx L = -v*ds(3) + v*ds(4) nullspace = VectorSpaceBasis(constant=True) u = Function(V) solve(a == L, u, nullspace=nullspace) exact = Function(V) exact.interpolate(x[1] - 0.5) > assert sqrt(assemble((u - exact)*(u - exact)*dx)) < 5e-8 tests/regression/test_nullspace.py:27: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('3f41a996961e3243cc96954b97de90f7', , False, False, True, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('uint32'), (, (1,), (,))), None, False, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/83/0d43adce82d1ceaf242d344e04efd3.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ______________________________________________________ test_nullspace_preassembled[False] _______________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_exterior_facet_in...ExtFacets'), (1,), 'dset_8928'), None, dtype('uint32'), 'plexmesh_exterior_local_facet_number'), None, Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d6878d268> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('1dc91532f9f13ed8273688594211e2a0', , False, False, True, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('1dc91532f9f13ed8273688594211e2a0', , False, False, True, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('uint32'), (, (1,), (,))), None, False, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/b7/72598b3ef9dd2f50a0003b66a125c3.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/b7/72598b3ef9dd2f50a0003b66a125c3.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: V = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32031)) def test_nullspace_preassembled(V): u = TrialFunction(V) v = TestFunction(V) x = SpatialCoordinate(V.mesh()) a = inner(grad(u), grad(v))*dx L = -v*ds(3) + v*ds(4) nullspace = VectorSpaceBasis(constant=True) u = Function(V) A = assemble(a) b = assemble(L) > solve(A, u, b, nullspace=nullspace) tests/regression/test_nullspace.py:85: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:128: in solve return _la_solve(*args, **kwargs) firedrake/solving.py:240: in _la_solve solver.solve(x, b) firedrake/linear_solver.py:157: in solve with self.inserted_options(), b.dat.vec_ro as rhs, acc as solution: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________________________ test_nullspace[True] ______________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...es'), Map(Set((625, 625, 625), 'Cells'), Set((676, 676, 676), 'set_9706'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d52f696a8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('7e338d661f2d347b4391e4075bc500bb', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('7e338d661f2d347b4391e4075bc500bb', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/84/6ba0fc940e25eea3e11465bfcf8131.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/84/6ba0fc940e25eea3e11465bfcf8131.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: V = WithGeometry(FunctionSpace(, FiniteElement('Q', quadrilateral, 1), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 32042)) def test_nullspace(V): u = TrialFunction(V) v = TestFunction(V) x = SpatialCoordinate(V.mesh()) a = inner(grad(u), grad(v))*dx L = -v*ds(3) + v*ds(4) nullspace = VectorSpaceBasis(constant=True) u = Function(V) solve(a == L, u, nullspace=nullspace) exact = Function(V) exact.interpolate(x[1] - 0.5) > assert sqrt(assemble((u - exact)*(u - exact)*dx)) < 5e-8 tests/regression/test_nullspace.py:27: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('a4df341f70fd3dec9a92451ce4dabba7', , False, False, True, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('uint32'), (, (1,), (,))), None, False, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/35/bc8ff0181de02d78179ff68f0f0651.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _______________________________________________________ test_nullspace_preassembled[True] _______________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_exterior_facet_in...ExtFacets'), (1,), 'dset_8932'), None, dtype('uint32'), 'plexmesh_exterior_local_facet_number'), None, Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d514f4b70> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('5a7bed1993f9f4e049888455a88c733d', , False, False, True, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('5a7bed1993f9f4e049888455a88c733d', , False, False, True, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('uint32'), (, (1,), (,))), None, False, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/3e/2fa9d26192c8f046a0d6919aed3cff.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/3e/2fa9d26192c8f046a0d6919aed3cff.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: V = WithGeometry(FunctionSpace(, FiniteElement('Q', quadrilateral, 1), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 32042)) def test_nullspace_preassembled(V): u = TrialFunction(V) v = TestFunction(V) x = SpatialCoordinate(V.mesh()) a = inner(grad(u), grad(v))*dx L = -v*ds(3) + v*ds(4) nullspace = VectorSpaceBasis(constant=True) u = Function(V) A = assemble(a) b = assemble(L) > solve(A, u, b, nullspace=nullspace) tests/regression/test_nullspace.py:85: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:128: in solve return _la_solve(*args, **kwargs) firedrake/solving.py:240: in _la_solve solver.solve(x, b) firedrake/linear_solver.py:157: in solve with self.inserted_options(), b.dat.vec_ro as rhs, acc as solution: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________________ test_transpose_nullspace ____________________________________________________________ def test_transpose_nullspace(): errors = [] for n in range(4, 10): mesh = UnitIntervalMesh(2**n) V = FunctionSpace(mesh, "CG", 1) u = TrialFunction(V) v = TestFunction(V) a = inner(grad(u), grad(v))*dx L = v*dx nullspace = VectorSpaceBasis(constant=True) u = Function(V) u.interpolate(SpatialCoordinate(mesh)[0]) # Solver diverges with indefinite PC if we don't remove # transpose nullspace. solve(a == L, u, nullspace=nullspace, transpose_nullspace=nullspace, solver_parameters={"ksp_type": "cg", "ksp_initial_guess_non_zero": True, > "pc_type": "gamg"}) tests/regression/test_nullspace.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:264: in solve self.snes.solve(None, work) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E petsc4py.PETSc.Error: error code 75 E [0] SNESSolve() line 4560 in /tmp/pip-req-build-eqqddqg6/src/snes/interface/snes.c E [0] SNESSolve_KSPONLY() line 48 in /tmp/pip-req-build-eqqddqg6/src/snes/impls/ksponly/ksponly.c E [0] KSPSolve() line 782 in /tmp/pip-req-build-eqqddqg6/src/ksp/ksp/interface/itfunc.c E [0] KSPSolve_CG() line 133 in /tmp/pip-req-build-eqqddqg6/src/ksp/ksp/impls/cg/cg.c E [0] KSP_PCApply() line 281 in /tmp/pip-req-build-eqqddqg6/include/petsc/private/kspimpl.h E [0] PCApply() line 462 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/interface/precon.c E [0] PCApply_MG() line 383 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/impls/mg/mg.c E [0] PCMGMCycle_Private() line 18 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/impls/mg/mg.c E [0] KSPSolve() line 782 in /tmp/pip-req-build-eqqddqg6/src/ksp/ksp/interface/itfunc.c E [0] KSPSolve_PREONLY() line 22 in /tmp/pip-req-build-eqqddqg6/src/ksp/ksp/impls/preonly/preonly.c E [0] KSP_PCApply() line 281 in /tmp/pip-req-build-eqqddqg6/include/petsc/private/kspimpl.h E [0] PCApply() line 462 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/interface/precon.c E [0] PCApply_SOR() line 31 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/impls/sor/sor.c E [0] MatSOR() line 4028 in /tmp/pip-req-build-eqqddqg6/src/mat/interface/matrix.c E [0] MatSOR_SeqAIJ() line 1756 in /tmp/pip-req-build-eqqddqg6/src/mat/impls/aij/seq/aij.c E [0] MatInvertDiagonal_SeqAIJ() line 1725 in /tmp/pip-req-build-eqqddqg6/src/mat/impls/aij/seq/aij.c E [0] Arguments are incompatible E [0] Zero diagonal on row 0 PETSc/SNES.pyx:555: Error ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('8ca359cd48136a3b96a5d4d794633d07', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/b1/71f50c8b536b26d89a97b348c349ce.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('510d5c8d8121ccb7bbd8d37f621e95a5', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 2, None), (, 2, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/f4/78f7c871306b09f13ea7bdcf58dec4.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 295, in form_jacobian ctx._jac.force_evaluation() File "/home/simone/firedrake/src/firedrake/firedrake/matrix.py", line 138, in force_evaluation self._M._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________________________________ test_nullspace_mixed ______________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...rdinates'), Map(Set((50, 50, 50), 'Cells'), Set((36, 36, 36), 'set_9718'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d9b416158> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('5eabb05b646969fe04526c88cbbbcb93', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('5eabb05b646969fe04526c88cbbbcb93', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/b2/35d26056f95fdc47dea7fdd084bca1.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/b2/35d26056f95fdc47dea7fdd084bca1.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: def test_nullspace_mixed(): m = UnitSquareMesh(5, 5) x = SpatialCoordinate(m) BDM = FunctionSpace(m, 'BDM', 1) DG = FunctionSpace(m, 'DG', 0) W = BDM * DG sigma, u = TrialFunctions(W) tau, v = TestFunctions(W) a = (dot(sigma, tau) + div(tau)*u + div(sigma)*v)*dx bc1 = Function(BDM).assign(0.0) bc2 = Function(BDM).project(Constant((0, 1))) bcs = [DirichletBC(W.sub(0), bc1, (1, 2)), DirichletBC(W.sub(0), bc2, (3, 4))] w = Function(W) f = Function(DG) f.assign(0) L = f*v*dx # Null space is constant functions in DG and empty in BDM. nullspace = MixedVectorSpaceBasis(W, [W.sub(0), VectorSpaceBasis(constant=True)]) solve(a == L, w, bcs=bcs, nullspace=nullspace) exact = Function(DG) exact.interpolate(x[1] - 0.5) sigma, u = w.split() > assert sqrt(assemble((u - exact)*(u - exact)*dx)) < 1e-7 tests/regression/test_nullspace.py:125: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('d3c185db87679a8aae1d7e0e82d4deab', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 2, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 2, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/a5/98976d15272ae46038cbab8b5e8e82.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 412, in vecscatter with d.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('aa5cc81fd2c6537424aa934b98c61ccf', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 2, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/12/9cd28c5ba559f05a0268b3fff0794d.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 289, in form_jacobian X.copy(v) File "/usr/lib/python3.6/contextlib.py", line 88, in __exit__ next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 419, in vecscatter with d.vec_wo as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ______________________________________________________________ test_near_nullspace ______________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...t((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d687919d8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('a85ff80a4f4e006aacafa5846fef54ac', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('a85ff80a4f4e006aacafa5846fef54ac', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/a0/79e20dd2ea0d0de8269c544993b52c.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/a0/79e20dd2ea0d0de8269c544993b52c.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: tmpdir = local('/tmp/pytest-of-simone/pytest-1/test_near_nullspace0') def test_near_nullspace(tmpdir): # Tests the near nullspace for the case of the linear elasticity equations mesh = UnitSquareMesh(100, 100) x, y = SpatialCoordinate(mesh) dim = 2 V = VectorFunctionSpace(mesh, "Lagrange", 1) u = TrialFunction(V) v = TestFunction(V) mu = Constant(0.2) lmbda = Constant(0.3) def sigma(fn): return 2.0 * mu * sym(grad(fn)) + lmbda * tr(sym(grad(fn))) * Identity(dim) w_exact = Function(V) w_exact.interpolate(as_vector([x*y, x*y])) f = Constant((mu + lmbda, mu + lmbda)) F = inner(sigma(u), grad(v))*dx + inner(f, v)*dx bcs = [DirichletBC(V, w_exact, (1, 2, 3, 4))] n0 = Constant((1, 0)) n1 = Constant((0, 1)) n2 = as_vector([y - 0.5, -(x - 0.5)]) ns = [n0, n1, n2] n_interp = [interpolate(n, V) for n in ns] > nsp = VectorSpaceBasis(vecs=n_interp) tests/regression/test_nullspace.py:170: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/nullspace.py:47: in __init__ with v.dat.vec_ro as v_: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________ test_octahedral_hemisphere[1-north] ______________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...es'), Map(Set((256, 256, 256), 'Cells'), Set((145, 145, 145), 'set_9728'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d684602f0> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('cebe8b516b8ed84de0c07b6ab00f1867', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('cebe8b516b8ed84de0c07b6ab00f1867', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 3, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/10/05d97ba6c73876e89f31e4b4523348.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/10/05d97ba6c73876e89f31e4b4523348.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 1, hemisphere = 'north', convergence = 1.7 def test_octahedral_hemisphere(degree, hemisphere, convergence): > errs = numpy.asarray([run_test(degree, r, hemisphere) for r in range(3, 6)]) tests/regression/test_octahedral_hemisphere.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_octahedral_hemisphere.py:48: in errs = numpy.asarray([run_test(degree, r, hemisphere) for r in range(3, 6)]) tests/regression/test_octahedral_hemisphere.py:43: in run_test "pc_type": "lu"}) firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:256: in solve with self._problem.u.dat.vec as u: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________ test_octahedral_hemisphere[1-south] ______________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...es'), Map(Set((256, 256, 256), 'Cells'), Set((145, 145, 145), 'set_9732'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3dc4559c80> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('cebe8b516b8ed84de0c07b6ab00f1867', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('cebe8b516b8ed84de0c07b6ab00f1867', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 3, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/10/05d97ba6c73876e89f31e4b4523348.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/10/05d97ba6c73876e89f31e4b4523348.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 1, hemisphere = 'south', convergence = 1.7 def test_octahedral_hemisphere(degree, hemisphere, convergence): > errs = numpy.asarray([run_test(degree, r, hemisphere) for r in range(3, 6)]) tests/regression/test_octahedral_hemisphere.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_octahedral_hemisphere.py:48: in errs = numpy.asarray([run_test(degree, r, hemisphere) for r in range(3, 6)]) tests/regression/test_octahedral_hemisphere.py:43: in run_test "pc_type": "lu"}) firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:256: in solve with self._problem.u.dat.vec as u: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________ test_octahedral_hemisphere[2-north] ______________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...14'), Map(Set((256, 256, 256), 'Cells'), Set((545, 545, 545), 'set_9739'), 6, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3dcf4e1ea0> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('b9fb4efff0ea69bc91f90ef4e8967684', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('b9fb4efff0ea69bc91f90ef4e8967684', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 6, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/91/db6d6b6276e62f149bc3f1673b2684.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/91/db6d6b6276e62f149bc3f1673b2684.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 2, hemisphere = 'north', convergence = 2.7 def test_octahedral_hemisphere(degree, hemisphere, convergence): > errs = numpy.asarray([run_test(degree, r, hemisphere) for r in range(3, 6)]) tests/regression/test_octahedral_hemisphere.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_octahedral_hemisphere.py:48: in errs = numpy.asarray([run_test(degree, r, hemisphere) for r in range(3, 6)]) tests/regression/test_octahedral_hemisphere.py:43: in run_test "pc_type": "lu"}) firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:256: in solve with self._problem.u.dat.vec as u: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________ test_octahedral_hemisphere[2-south] ______________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...24'), Map(Set((256, 256, 256), 'Cells'), Set((545, 545, 545), 'set_9744'), 6, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3e40f26620> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('b9fb4efff0ea69bc91f90ef4e8967684', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('b9fb4efff0ea69bc91f90ef4e8967684', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 6, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/91/db6d6b6276e62f149bc3f1673b2684.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/91/db6d6b6276e62f149bc3f1673b2684.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 2, hemisphere = 'south', convergence = 2.7 def test_octahedral_hemisphere(degree, hemisphere, convergence): > errs = numpy.asarray([run_test(degree, r, hemisphere) for r in range(3, 6)]) tests/regression/test_octahedral_hemisphere.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_octahedral_hemisphere.py:48: in errs = numpy.asarray([run_test(degree, r, hemisphere) for r in range(3, 6)]) tests/regression/test_octahedral_hemisphere.py:43: in run_test "pc_type": "lu"}) firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:256: in solve with self._problem.u.dat.vec as u: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________ test_octahedral_hemisphere[3-north] ______________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----..., Map(Set((256, 256, 256), 'Cells'), Set((1201, 1201, 1201), 'set_9749'), 10, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d6877f378> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('a2b9a6fc1a2bff25bd16cdf4c51e9e01', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('a2b9a6fc1a2bff25bd16cdf4c51e9e01', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 10, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 10, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/79/3f2bd991259b9578d2a5e7c51580b5.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/79/3f2bd991259b9578d2a5e7c51580b5.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 3, hemisphere = 'north', convergence = 3.7 def test_octahedral_hemisphere(degree, hemisphere, convergence): > errs = numpy.asarray([run_test(degree, r, hemisphere) for r in range(3, 6)]) tests/regression/test_octahedral_hemisphere.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_octahedral_hemisphere.py:48: in errs = numpy.asarray([run_test(degree, r, hemisphere) for r in range(3, 6)]) tests/regression/test_octahedral_hemisphere.py:43: in run_test "pc_type": "lu"}) firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:256: in solve with self._problem.u.dat.vec as u: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________ test_octahedral_hemisphere[3-south] ______________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----..., Map(Set((256, 256, 256), 'Cells'), Set((1201, 1201, 1201), 'set_9754'), 10, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d6877fc80> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('a2b9a6fc1a2bff25bd16cdf4c51e9e01', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('a2b9a6fc1a2bff25bd16cdf4c51e9e01', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 10, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 10, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/79/3f2bd991259b9578d2a5e7c51580b5.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/79/3f2bd991259b9578d2a5e7c51580b5.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 3, hemisphere = 'south', convergence = 3.7 def test_octahedral_hemisphere(degree, hemisphere, convergence): > errs = numpy.asarray([run_test(degree, r, hemisphere) for r in range(3, 6)]) tests/regression/test_octahedral_hemisphere.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_octahedral_hemisphere.py:48: in errs = numpy.asarray([run_test(degree, r, hemisphere) for r in range(3, 6)]) tests/regression/test_octahedral_hemisphere.py:43: in run_test "pc_type": "lu"}) firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:256: in solve with self._problem.u.dat.vec as u: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________________ test_p_independence[Interval] _________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 32152), expected = [5, 5, 5, 5] def test_p_independence(mesh, expected): nits = [] for p in range(1, 5): V = FunctionSpace(mesh, "CG", p) u = TrialFunction(V) v = TestFunction(V) a = inner(grad(u), grad(v))*dx L = inner(Constant(1), v)*dx bcs = DirichletBC(V, zero(V.ufl_element().value_shape()), "on_boundary") uh = Function(V) problem = LinearVariationalProblem(a, L, uh, bcs=bcs) solver = LinearVariationalSolver(problem, solver_parameters={ "mat_type": "matfree", "ksp_type": "cg", "pc_type": "composite", "pc_composite_type": "additive", "pc_composite_pcs": "python,python", "sub_0_pc_python_type": "firedrake.PatchPC", "sub_0_patch": { "pc_patch_sub_mat_type": "aij", "pc_patch_save_operators": True, "pc_patch_construct_dim": 0, "pc_patch_construct_type": "star", "sub_ksp_type": "preonly", "sub_pc_type": "lu", }, "sub_1_pc_python_type": "firedrake.P1PC", "sub_1_lo": { "mat_type": "aij", "ksp_type": "preonly", "pc_type": "cholesky", }, "ksp_monitor": None}) solver.solve() nits.append(solver.snes.ksp.getIterationNumber()) > assert (nits == expected) E assert [0, 0, 0, 0] == [5, 5, 5, 5] E At index 0 diff: 0 != 5 E Use -v to get the full diff tests/regression/test_p1pc.py:70: AssertionError ------------------------------------------------------------- Captured stdout call -------------------------------------------------------------- Residual norms for firedrake_1438_ solve. 0 KSP Residual norm 0.000000000000e+00 Residual norms for firedrake_1439_ solve. 0 KSP Residual norm 0.000000000000e+00 Residual norms for firedrake_1440_ solve. 0 KSP Residual norm 0.000000000000e+00 Residual norms for firedrake_1441_ solve. 0 KSP Residual norm 0.000000000000e+00 ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('6b29fc992cd893b511fab77ab70463bb', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/39/c04e067dbed9e68e537b15dc3e2165.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('4513327cda4d0c191545dcfa18a3e855', , False, False, True, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 2, None), (, 2, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/e0/f339a8954c447af29d06f32ecabdef.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1252, in libpetsc4py.PCSetUp_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 105, in setUp super().setUp(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 45, in setUp self.initialize(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 448, in initialize Jcell_kernels, Jint_facet_kernels = matrix_funptr(J, Jstate) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 175, in matrix_funptr mod = seq.JITModule(kinfo.kernel, iterset, *args) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1343, in libpetsc4py.PCApply_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 687, in apply self.patch.apply(x, y) AttributeError: 'PatchPC' object has no attribute 'patch' The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('510d5c8d8121ccb7bbd8d37f621e95a5', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 2, None), (, 2, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/f4/78f7c871306b09f13ea7bdcf58dec4.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1252, in libpetsc4py.PCSetUp_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 105, in setUp super().setUp(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 45, in setUp self.initialize(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/low_order.py", line 156, in initialize self.lo_op.force_evaluation() File "/home/simone/firedrake/src/firedrake/firedrake/matrix.py", line 138, in force_evaluation self._M._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1343, in libpetsc4py.PCApply_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/low_order.py", line 196, in apply work1, work2 = self.work AttributeError: 'P1PC' object has no attribute 'work' The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('ccab9f9ca0cb4e87b2b3df73b26e5c50', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 1, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/ba/27929cd3c7c5d872d83f25fd179207.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('11d3fbd11b1ce1dad532443e1542db34', , False, False, True, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 3, None), (, 3, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/2d/d345bb2de84e19f472076918e7c083.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1252, in libpetsc4py.PCSetUp_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 105, in setUp super().setUp(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 45, in setUp self.initialize(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 448, in initialize Jcell_kernels, Jint_facet_kernels = matrix_funptr(J, Jstate) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 175, in matrix_funptr mod = seq.JITModule(kinfo.kernel, iterset, *args) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1343, in libpetsc4py.PCApply_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 687, in apply self.patch.apply(x, y) AttributeError: 'PatchPC' object has no attribute 'patch' The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('510d5c8d8121ccb7bbd8d37f621e95a5', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 2, None), (, 2, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/f4/78f7c871306b09f13ea7bdcf58dec4.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1252, in libpetsc4py.PCSetUp_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 105, in setUp super().setUp(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 45, in setUp self.initialize(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/low_order.py", line 156, in initialize self.lo_op.force_evaluation() File "/home/simone/firedrake/src/firedrake/firedrake/matrix.py", line 138, in force_evaluation self._M._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1343, in libpetsc4py.PCApply_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/low_order.py", line 196, in apply work1, work2 = self.work AttributeError: 'P1PC' object has no attribute 'work' The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('bc44e1d26633986b80b475907512cb67', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 1, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/25/36db7ec6340da79c4c3659d73a222c.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('0c898f89aafa4c1ad7863449eab2ec0d', , False, False, True, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 4, None), (, 4, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/78/6296a2eec835f1afcd5a26bde91be2.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1252, in libpetsc4py.PCSetUp_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 105, in setUp super().setUp(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 45, in setUp self.initialize(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 448, in initialize Jcell_kernels, Jint_facet_kernels = matrix_funptr(J, Jstate) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 175, in matrix_funptr mod = seq.JITModule(kinfo.kernel, iterset, *args) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1343, in libpetsc4py.PCApply_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 687, in apply self.patch.apply(x, y) AttributeError: 'PatchPC' object has no attribute 'patch' The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('510d5c8d8121ccb7bbd8d37f621e95a5', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 2, None), (, 2, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/f4/78f7c871306b09f13ea7bdcf58dec4.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1252, in libpetsc4py.PCSetUp_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 105, in setUp super().setUp(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 45, in setUp self.initialize(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/low_order.py", line 156, in initialize self.lo_op.force_evaluation() File "/home/simone/firedrake/src/firedrake/firedrake/matrix.py", line 138, in force_evaluation self._M._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1343, in libpetsc4py.PCApply_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/low_order.py", line 196, in apply work1, work2 = self.work AttributeError: 'P1PC' object has no attribute 'work' The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('5f25fa3e9a865e1601f78e21f5165e51', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 5, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 1, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 5, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/55/bce182fc5c9d34c112934dd8969678.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('967ab52292ea3b0b52215dbe1e7781b2', , False, False, True, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 5, None), (, 5, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/4e/38f5ec70a4765335e80c6893767762.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1252, in libpetsc4py.PCSetUp_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 105, in setUp super().setUp(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 45, in setUp self.initialize(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 448, in initialize Jcell_kernels, Jint_facet_kernels = matrix_funptr(J, Jstate) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 175, in matrix_funptr mod = seq.JITModule(kinfo.kernel, iterset, *args) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1343, in libpetsc4py.PCApply_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 687, in apply self.patch.apply(x, y) AttributeError: 'PatchPC' object has no attribute 'patch' The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('510d5c8d8121ccb7bbd8d37f621e95a5', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 2, None), (, 2, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/f4/78f7c871306b09f13ea7bdcf58dec4.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1252, in libpetsc4py.PCSetUp_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 105, in setUp super().setUp(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 45, in setUp self.initialize(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/low_order.py", line 156, in initialize self.lo_op.force_evaluation() File "/home/simone/firedrake/src/firedrake/firedrake/matrix.py", line 138, in force_evaluation self._M._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1343, in libpetsc4py.PCApply_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/low_order.py", line 196, in apply work1, work2 = self.work AttributeError: 'P1PC' object has no attribute 'work' The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________________________ test_p_independence[Rectangle] _________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32190), expected = [10, 12, 12, 12] def test_p_independence(mesh, expected): nits = [] for p in range(1, 5): V = FunctionSpace(mesh, "CG", p) u = TrialFunction(V) v = TestFunction(V) a = inner(grad(u), grad(v))*dx L = inner(Constant(1), v)*dx bcs = DirichletBC(V, zero(V.ufl_element().value_shape()), "on_boundary") uh = Function(V) problem = LinearVariationalProblem(a, L, uh, bcs=bcs) solver = LinearVariationalSolver(problem, solver_parameters={ "mat_type": "matfree", "ksp_type": "cg", "pc_type": "composite", "pc_composite_type": "additive", "pc_composite_pcs": "python,python", "sub_0_pc_python_type": "firedrake.PatchPC", "sub_0_patch": { "pc_patch_sub_mat_type": "aij", "pc_patch_save_operators": True, "pc_patch_construct_dim": 0, "pc_patch_construct_type": "star", "sub_ksp_type": "preonly", "sub_pc_type": "lu", }, "sub_1_pc_python_type": "firedrake.P1PC", "sub_1_lo": { "mat_type": "aij", "ksp_type": "preonly", "pc_type": "cholesky", }, "ksp_monitor": None}) solver.solve() nits.append(solver.snes.ksp.getIterationNumber()) > assert (nits == expected) E assert [0, 0, 0, 0] == [10, 12, 12, 12] E At index 0 diff: 0 != 10 E Use -v to get the full diff tests/regression/test_p1pc.py:70: AssertionError ------------------------------------------------------------- Captured stdout call -------------------------------------------------------------- Residual norms for firedrake_1442_ solve. 0 KSP Residual norm 0.000000000000e+00 Residual norms for firedrake_1443_ solve. 0 KSP Residual norm 0.000000000000e+00 Residual norms for firedrake_1444_ solve. 0 KSP Residual norm 0.000000000000e+00 Residual norms for firedrake_1445_ solve. 0 KSP Residual norm 0.000000000000e+00 ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('565ea7404c23e80f07ae6c37da50f4b5', , False, False, True, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 3, None), (, 3, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/a3/0b545386f1dbca20466fc617f6ff75.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1252, in libpetsc4py.PCSetUp_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 105, in setUp super().setUp(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 45, in setUp self.initialize(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 448, in initialize Jcell_kernels, Jint_facet_kernels = matrix_funptr(J, Jstate) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 175, in matrix_funptr mod = seq.JITModule(kinfo.kernel, iterset, *args) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1343, in libpetsc4py.PCApply_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 687, in apply self.patch.apply(x, y) AttributeError: 'PatchPC' object has no attribute 'patch' The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('bb6881f10fb7ec8de9d2287abb760610', , False, False, False, , Access('WRITE'), (, dtype('float64'), (((1, 1),),)), ((, 3, None), (, 3, None)), False, 0, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/32/330c98123ac57b08764cce30435334.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1252, in libpetsc4py.PCSetUp_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 105, in setUp super().setUp(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 45, in setUp self.initialize(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/low_order.py", line 178, in initialize self.restriction = restriction_matrix(Pk, P1, self.bcs, self.lo_bcs) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/low_order.py", line 106, in restriction_matrix mat._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1343, in libpetsc4py.PCApply_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/low_order.py", line 196, in apply work1, work2 = self.work AttributeError: 'P1PC' object has no attribute 'work' The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('4169ede008f9ae7197b5b1c6946371af', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/e7/8d12f63534ec89d18fdb058b9736b9.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('27a0d651e5b310d1894d5ddc3ea47b37', , False, False, True, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 6, None), (, 6, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/ab/4d39a0382176b88e2cb6ba2a720697.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1252, in libpetsc4py.PCSetUp_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 105, in setUp super().setUp(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 45, in setUp self.initialize(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 448, in initialize Jcell_kernels, Jint_facet_kernels = matrix_funptr(J, Jstate) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 175, in matrix_funptr mod = seq.JITModule(kinfo.kernel, iterset, *args) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1343, in libpetsc4py.PCApply_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 687, in apply self.patch.apply(x, y) AttributeError: 'PatchPC' object has no attribute 'patch' The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('e8abb2bb54f9a9736aac8b1dd7a78449', , False, False, False, , Access('WRITE'), (, dtype('float64'), (((1, 1),),)), ((, 3, None), (, 6, None)), False, 0, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/44/59977949556c9b582bbb473a96ac1f.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1252, in libpetsc4py.PCSetUp_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 105, in setUp super().setUp(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 45, in setUp self.initialize(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/low_order.py", line 178, in initialize self.restriction = restriction_matrix(Pk, P1, self.bcs, self.lo_bcs) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/low_order.py", line 106, in restriction_matrix mat._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1343, in libpetsc4py.PCApply_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/low_order.py", line 196, in apply work1, work2 = self.work AttributeError: 'P1PC' object has no attribute 'work' The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('7e8582cd989739f0b3132d4b220053e5', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 10, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 10, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/46/9dfcf8c81c8f95bf2987ca10a8adcc.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('8b5e3fce85891b5d111405b0c36bff98', , False, False, True, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 10, None), (, 10, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/2d/41a26c2a7347a41ab5e6c196843f44.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1252, in libpetsc4py.PCSetUp_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 105, in setUp super().setUp(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 45, in setUp self.initialize(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 448, in initialize Jcell_kernels, Jint_facet_kernels = matrix_funptr(J, Jstate) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 175, in matrix_funptr mod = seq.JITModule(kinfo.kernel, iterset, *args) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1343, in libpetsc4py.PCApply_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 687, in apply self.patch.apply(x, y) AttributeError: 'PatchPC' object has no attribute 'patch' The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('994127be9310c3ca01f307707bab25f9', , False, False, False, , Access('WRITE'), (, dtype('float64'), (((1, 1),),)), ((, 3, None), (, 10, None)), False, 0, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/11/d951e3ce67ea58fe18ca682559cbed.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1252, in libpetsc4py.PCSetUp_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 105, in setUp super().setUp(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 45, in setUp self.initialize(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/low_order.py", line 178, in initialize self.restriction = restriction_matrix(Pk, P1, self.bcs, self.lo_bcs) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/low_order.py", line 106, in restriction_matrix mat._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1343, in libpetsc4py.PCApply_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/low_order.py", line 196, in apply work1, work2 = self.work AttributeError: 'P1PC' object has no attribute 'work' The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('fa9632f9aa98b1f5f232871c64b8e838', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 15, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 15, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/ec/8bf3a39e3e590a91a6aca7cbcc84a0.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('adc7e20f5fa00e8349876edf922ba3fc', , False, False, True, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 15, None), (, 15, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/3b/8155dad1e641c2d90a13ef4dfb7c8c.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1252, in libpetsc4py.PCSetUp_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 105, in setUp super().setUp(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 45, in setUp self.initialize(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 448, in initialize Jcell_kernels, Jint_facet_kernels = matrix_funptr(J, Jstate) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 175, in matrix_funptr mod = seq.JITModule(kinfo.kernel, iterset, *args) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1343, in libpetsc4py.PCApply_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 687, in apply self.patch.apply(x, y) AttributeError: 'PatchPC' object has no attribute 'patch' The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('fa38b2e62b54858f3ba05fe84c03b7a9', , False, False, False, , Access('WRITE'), (, dtype('float64'), (((1, 1),),)), ((, 3, None), (, 15, None)), False, 0, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/f3/56b59133031f36f9c3f3866adf7df8.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1252, in libpetsc4py.PCSetUp_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 105, in setUp super().setUp(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 45, in setUp self.initialize(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/low_order.py", line 178, in initialize self.restriction = restriction_matrix(Pk, P1, self.bcs, self.lo_bcs) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/low_order.py", line 106, in restriction_matrix mat._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1343, in libpetsc4py.PCApply_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/low_order.py", line 196, in apply work1, work2 = self.work AttributeError: 'P1PC' object has no attribute 'work' The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ___________________________________________________________ test_p_independence[Box] ____________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 32228), expected = [4, 21, 22, 22] def test_p_independence(mesh, expected): nits = [] for p in range(1, 5): V = FunctionSpace(mesh, "CG", p) u = TrialFunction(V) v = TestFunction(V) a = inner(grad(u), grad(v))*dx L = inner(Constant(1), v)*dx bcs = DirichletBC(V, zero(V.ufl_element().value_shape()), "on_boundary") uh = Function(V) problem = LinearVariationalProblem(a, L, uh, bcs=bcs) solver = LinearVariationalSolver(problem, solver_parameters={ "mat_type": "matfree", "ksp_type": "cg", "pc_type": "composite", "pc_composite_type": "additive", "pc_composite_pcs": "python,python", "sub_0_pc_python_type": "firedrake.PatchPC", "sub_0_patch": { "pc_patch_sub_mat_type": "aij", "pc_patch_save_operators": True, "pc_patch_construct_dim": 0, "pc_patch_construct_type": "star", "sub_ksp_type": "preonly", "sub_pc_type": "lu", }, "sub_1_pc_python_type": "firedrake.P1PC", "sub_1_lo": { "mat_type": "aij", "ksp_type": "preonly", "pc_type": "cholesky", }, "ksp_monitor": None}) solver.solve() nits.append(solver.snes.ksp.getIterationNumber()) > assert (nits == expected) E assert [0, 0, 0, 0] == [4, 21, 22, 22] E At index 0 diff: 0 != 4 E Use -v to get the full diff tests/regression/test_p1pc.py:70: AssertionError ------------------------------------------------------------- Captured stdout call -------------------------------------------------------------- Residual norms for firedrake_1446_ solve. 0 KSP Residual norm 0.000000000000e+00 Residual norms for firedrake_1447_ solve. 0 KSP Residual norm 0.000000000000e+00 Residual norms for firedrake_1448_ solve. 0 KSP Residual norm 0.000000000000e+00 Residual norms for firedrake_1449_ solve. 0 KSP Residual norm 0.000000000000e+00 ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('8f417c02ab9b35d665b1e8aac29790a9', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/65/0ceead4ab94c777645e785bebbac58.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('137fae2b18a7c3489cb05b4824b8c3de', , False, False, True, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 4, None), (, 4, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/e4/4d902894a150e1f754aa8624ac2bce.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1252, in libpetsc4py.PCSetUp_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 105, in setUp super().setUp(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 45, in setUp self.initialize(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 448, in initialize Jcell_kernels, Jint_facet_kernels = matrix_funptr(J, Jstate) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 175, in matrix_funptr mod = seq.JITModule(kinfo.kernel, iterset, *args) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1343, in libpetsc4py.PCApply_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 687, in apply self.patch.apply(x, y) AttributeError: 'PatchPC' object has no attribute 'patch' The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('9dedfb75023c8da69508f9fe5bd9e6c0', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 4, None), (, 4, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/0c/a4ea6e3c71cf1ddcb0a5eaee1b7475.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1252, in libpetsc4py.PCSetUp_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 105, in setUp super().setUp(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 45, in setUp self.initialize(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/low_order.py", line 156, in initialize self.lo_op.force_evaluation() File "/home/simone/firedrake/src/firedrake/firedrake/matrix.py", line 138, in force_evaluation self._M._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1343, in libpetsc4py.PCApply_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/low_order.py", line 196, in apply work1, work2 = self.work AttributeError: 'P1PC' object has no attribute 'work' The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('b551321949e383d9c497c6de015e7443', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 10, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 1, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 10, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/72/b63e0dd6fcb11f46c706140e0252a7.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('181e14f5398cc53d1ef96d48f5b29750', , False, False, True, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 10, None), (, 10, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/de/508f20a7940b6f4aff963a736afe56.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1252, in libpetsc4py.PCSetUp_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 105, in setUp super().setUp(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 45, in setUp self.initialize(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 448, in initialize Jcell_kernels, Jint_facet_kernels = matrix_funptr(J, Jstate) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 175, in matrix_funptr mod = seq.JITModule(kinfo.kernel, iterset, *args) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1343, in libpetsc4py.PCApply_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 687, in apply self.patch.apply(x, y) AttributeError: 'PatchPC' object has no attribute 'patch' The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('9dedfb75023c8da69508f9fe5bd9e6c0', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 4, None), (, 4, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/0c/a4ea6e3c71cf1ddcb0a5eaee1b7475.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1252, in libpetsc4py.PCSetUp_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 105, in setUp super().setUp(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 45, in setUp self.initialize(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/low_order.py", line 156, in initialize self.lo_op.force_evaluation() File "/home/simone/firedrake/src/firedrake/firedrake/matrix.py", line 138, in force_evaluation self._M._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1343, in libpetsc4py.PCApply_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/low_order.py", line 196, in apply work1, work2 = self.work AttributeError: 'P1PC' object has no attribute 'work' The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('2311835fe0bff8ebe207673099e08368', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 20, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 1, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 20, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/92/81ca08298c673fe696433ab334e6b7.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('bd5210dcc11d00399fd5d6d7e2485d4a', , False, False, True, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 20, None), (, 20, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/cd/00d474c1c9800993b11a09680343dd.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1252, in libpetsc4py.PCSetUp_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 105, in setUp super().setUp(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 45, in setUp self.initialize(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 448, in initialize Jcell_kernels, Jint_facet_kernels = matrix_funptr(J, Jstate) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 175, in matrix_funptr mod = seq.JITModule(kinfo.kernel, iterset, *args) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1343, in libpetsc4py.PCApply_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 687, in apply self.patch.apply(x, y) AttributeError: 'PatchPC' object has no attribute 'patch' The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('9dedfb75023c8da69508f9fe5bd9e6c0', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 4, None), (, 4, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/0c/a4ea6e3c71cf1ddcb0a5eaee1b7475.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1252, in libpetsc4py.PCSetUp_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 105, in setUp super().setUp(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 45, in setUp self.initialize(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/low_order.py", line 156, in initialize self.lo_op.force_evaluation() File "/home/simone/firedrake/src/firedrake/firedrake/matrix.py", line 138, in force_evaluation self._M._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1343, in libpetsc4py.PCApply_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/low_order.py", line 196, in apply work1, work2 = self.work AttributeError: 'P1PC' object has no attribute 'work' The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('789467d24111b5ef9d2de019a32fdd18', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 35, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 1, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 35, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/9b/f7d0e3ea287966e4c98219c5499b27.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('013d1b2dd87bdf44429852234b8739a5', , False, False, True, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 35, None), (, 35, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/2e/55dfb839c4983721bd9af31057af37.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1252, in libpetsc4py.PCSetUp_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 105, in setUp super().setUp(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 45, in setUp self.initialize(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 448, in initialize Jcell_kernels, Jint_facet_kernels = matrix_funptr(J, Jstate) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 175, in matrix_funptr mod = seq.JITModule(kinfo.kernel, iterset, *args) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1343, in libpetsc4py.PCApply_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 687, in apply self.patch.apply(x, y) AttributeError: 'PatchPC' object has no attribute 'patch' The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('9dedfb75023c8da69508f9fe5bd9e6c0', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 4, None), (, 4, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/0c/a4ea6e3c71cf1ddcb0a5eaee1b7475.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1252, in libpetsc4py.PCSetUp_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 105, in setUp super().setUp(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 45, in setUp self.initialize(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/low_order.py", line 156, in initialize self.lo_op.force_evaluation() File "/home/simone/firedrake/src/firedrake/firedrake/matrix.py", line 138, in force_evaluation self._M._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1343, in libpetsc4py.PCApply_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/low_order.py", line 196, in apply work1, work2 = self.work AttributeError: 'P1PC' object has no attribute 'work' The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________________________________ test_direct_par_loop ______________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: par_loop_kernel -------...et((3, 3, 3), 'set_9789'), (1,), 'None_nodes_dset'), None, dtype('float64'), 'function_32268'), None, Access('WRITE'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d54e1d950> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('00d48ccbbf3f878d816ad9d099512ef6', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('00d48ccbbf3f878d816ad9d099512ef6', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), None, False, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/ab/4ad006b629bc04ff9930aa0fc74264.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/ab/4ad006b629bc04ff9930aa0fc74264.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: f = (Coefficient(WithGeometry(FunctionSpace(, FiniteElement('Lagrang...agrange', interval, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 32266)), 47034)) def test_direct_par_loop(f): c, _ = f domain = "" instructions = """ c[0, 0] = 1 """ par_loop((domain, instructions), direct, {'c': (c, WRITE)}, is_loopy_kernel=True) > assert np.allclose(c.dat.data, 1.0) tests/regression/test_par_loops.py:58: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../PyOP2/pyop2/base.py:1623: in data _trace.evaluate(set([self]), set([self])) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________ test_mixed_direct_par_loop_components[0] ____________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: par_loop_kernel -------..., 3), 'set_9789'), (1,), 'None_nodes_dset'), None, dtype('float64'), 'function_32273[cmpt-0]'), None, Access('WRITE'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d68479730> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('00d48ccbbf3f878d816ad9d099512ef6', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('00d48ccbbf3f878d816ad9d099512ef6', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), None, False, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/ab/4ad006b629bc04ff9930aa0fc74264.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/ab/4ad006b629bc04ff9930aa0fc74264.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: f_mixed = Coefficient(WithGeometry(MixedFunctionSpace(IndexedProxyFunctionSpace( assert np.allclose(f_mixed.dat[idx].data, 1.0) tests/regression/test_par_loops.py:81: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../PyOP2/pyop2/base.py:1623: in data _trace.evaluate(set([self]), set([self])) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________ test_mixed_direct_par_loop_components[1] ____________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: par_loop_kernel -------..., 2), 'set_9792'), (1,), 'None_nodes_dset'), None, dtype('float64'), 'function_32276[cmpt-1]'), None, Access('WRITE'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d62dce6a8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('0de4049f51cd7cd2f7d8bafbd9dd7960', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('0de4049f51cd7cd2f7d8bafbd9dd7960', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), None, False, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/47/210376aa52d74a2aeaad915f17e96d.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/47/210376aa52d74a2aeaad915f17e96d.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: f_mixed = Coefficient(WithGeometry(MixedFunctionSpace(IndexedProxyFunctionSpace( assert np.allclose(f_mixed.dat[idx].data, 1.0) tests/regression/test_par_loops.py:81: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../PyOP2/pyop2/base.py:1623: in data _trace.evaluate(set([self]), set([self])) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_direct_par_loop_read_const ________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: par_loop_kernel -------...2279'), None, Access('WRITE')), Arg(Global((1,), array([10.]), dtype('float64'), 'global_3150'), None, Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d62e51950> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('bed656b9c3718093810fd63897663554', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('bed656b9c3718093810fd63897663554', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), None, False, , Access('READ'), (, dtype('float64'), (1,)), None, False, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/e2/12a35585d1dbd16fc4a963f53235be.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/e2/12a35585d1dbd16fc4a963f53235be.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: f = (Coefficient(WithGeometry(FunctionSpace(, FiniteElement('Lagrang...agrange', interval, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 32266)), 47044)) const = Constant(FiniteElement('Real', interval, 0), 47045) def test_direct_par_loop_read_const(f, const): c, _ = f const.assign(10.0) domain = "" instructions = """ c[0, 0] = constant[0] """ par_loop((domain, instructions), direct, {'c': (c, WRITE), 'constant': (const, READ)}, is_loopy_kernel=True) > assert np.allclose(c.dat.data, const.dat.data) tests/regression/test_par_loops.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../PyOP2/pyop2/base.py:1623: in data _trace.evaluate(set([self]), set([self])) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_indirect_par_loop_read_const _______________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: par_loop_kernel -------...unction_32282'), Map(Set((2, 2, 2), 'Cells'), Set((2, 2, 2), 'set_9792'), 1, None, 'None_cell_node'), Access('WRITE'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3e71ac8488> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('38027c9ec25eee5bd97b60244a05c365', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('38027c9ec25eee5bd97b60244a05c365', , False, False, False, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/d3/0bc1dbc329ca3eeca8facd14e3754a.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/d3/0bc1dbc329ca3eeca8facd14e3754a.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: f = (Coefficient(WithGeometry(FunctionSpace(, FiniteElement('Lagrang...agrange', interval, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 32266)), 47049)) const = Constant(FiniteElement('Real', interval, 0), 47050) def test_indirect_par_loop_read_const(f, const): _, d = f const.assign(10.0) domain = "{[i]: 0 <= i < d.dofs}" instructions = """ for i d[i, 0] = constant[0] end """ par_loop((domain, instructions), dx, {'d': (d, WRITE), 'constant': (const, READ)}, is_loopy_kernel=True) > assert np.allclose(d.dat.data, const.dat.data) tests/regression/test_par_loops.py:111: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../PyOP2/pyop2/base.py:1623: in data _trace.evaluate(set([self]), set([self])) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________________ test_dict_order_parallel ____________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________ test_indirect_par_loop_read_const_mixed_component[0] ______________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: par_loop_kernel -------...32286[cmpt-0]'), Map(Set((2, 2, 2), 'Cells'), Set((3, 3, 3), 'set_9789'), 2, None, 'None_cell_node'), Access('WRITE'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d68479730> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('5115ec585a4bdc6b450aeb32f99cf955', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('5115ec585a4bdc6b450aeb32f99cf955', , False, False, False, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/e3/06c404f429ed36f0a4f4a203164ae3.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/e3/06c404f429ed36f0a4f4a203164ae3.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: f_mixed = Coefficient(WithGeometry(MixedFunctionSpace(IndexedProxyFunctionSpace( assert np.allclose(f_mixed.dat[idx].data, const.dat.data) tests/regression/test_par_loops.py:173: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../PyOP2/pyop2/base.py:1623: in data _trace.evaluate(set([self]), set([self])) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________ test_indirect_par_loop_read_const_mixed_component[1] ______________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: par_loop_kernel -------...32289[cmpt-1]'), Map(Set((2, 2, 2), 'Cells'), Set((2, 2, 2), 'set_9792'), 1, None, 'None_cell_node'), Access('WRITE'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d68479f28> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('38027c9ec25eee5bd97b60244a05c365', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('38027c9ec25eee5bd97b60244a05c365', , False, False, False, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/d3/0bc1dbc329ca3eeca8facd14e3754a.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/d3/0bc1dbc329ca3eeca8facd14e3754a.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: f_mixed = Coefficient(WithGeometry(MixedFunctionSpace(IndexedProxyFunctionSpace( assert np.allclose(f_mixed.dat[idx].data, const.dat.data) tests/regression/test_par_loops.py:173: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../PyOP2/pyop2/base.py:1623: in data _trace.evaluate(set([self]), set([self])) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________________ test_cg_max_field _______________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----..., 'Coordinates'), Map(Set((2, 2, 2), 'Cells'), Set((3, 3, 3), 'set_9789'), 2, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d50a6b6a8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('8794d0e89ff1813f65d512c258e3eaa1', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('8794d0e89ff1813f65d512c258e3eaa1', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/61/4dc2dcf77f37015381913c18aa7d23.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/61/4dc2dcf77f37015381913c18aa7d23.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: f = (Coefficient(WithGeometry(FunctionSpace(, FiniteElement('Lagrang...agrange', interval, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 32266)), 47068)) def test_cg_max_field(f): c, d = f x = SpatialCoordinate(d.function_space().mesh()) d.interpolate(x[0]) domain = "{[i]: 0 <= i < c.dofs}" instructions = """ for i c[i, 0] = fmax(c[i, 0], d[0, 0]) end """ par_loop((domain, instructions), dx, {'c': (c, RW), 'd': (d, READ)}, is_loopy_kernel=True) > assert (c.dat.data == [1./4, 3./4, 3./4]).all() tests/regression/test_par_loops.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../PyOP2/pyop2/base.py:1623: in data _trace.evaluate(set([self]), set([self])) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_cg_max_field_extruded ___________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----..., 2), 'Cells'), array([[0, 3]], dtype=int32)), Set((9, 9, 9), 'set_9797'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d68282378> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = , key = ('e3350926d7de404fc84ec60cb94193aa', , True, True, True, False, ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('e3350926d7de404fc84ec60cb94193aa', , True, True, True, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 1, (1,)),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, (1, 1, 1, 1)),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/d1/47dd8b1279feb7a58f6468d195cd69.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/d1/47dd8b1279feb7a58f6468d195cd69.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: f_extruded = (Coefficient(WithGeometry(FunctionSpace(, TensorProductE...rval, 1), FiniteElement('Lagrange', interval, 1), cell=TensorProductCell(interval, interval)), dim=2), 32299)), 47076)) def test_cg_max_field_extruded(f_extruded): c, d = f_extruded x = SpatialCoordinate(d.function_space().mesh()) d.interpolate(x[0]) domain = "{[i]: 0 <= i < c.dofs}" instructions = """ for i c[i, 0] = if(c[i, 0] > d[0, 0], c[i, 0], d[0, 0]) end """ par_loop((domain, instructions), dx, {'c': (c, RW), 'd': (d, READ)}, is_loopy_kernel=True) > assert (c.dat.data == [1./4, 1./4, 1./4, 3./4, 3./4, 3./4, 3./4, 3./4, 3./4]).all() tests/regression/test_par_loops.py:219: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../PyOP2/pyop2/base.py:1623: in data _trace.evaluate(set([self]), set([self])) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________________ test_cell_subdomain[1] _____________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: par_loop_kernel -------...n_32305'), Map(Set((12, 12, 12), 'Cells'), Set((12, 12, 12), 'set_9803'), 1, None, 'None_cell_node'), Access('WRITE'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d9c474510> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('27c88d4b931ca472ec1fa9bf15df86de', , False, False, True, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('27c88d4b931ca472ec1fa9bf15df86de', , False, False, True, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/0e/b001af61e014e8cc72feac8cf32607.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/0e/b001af61e014e8cc72feac8cf32607.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: subdomain = 1 @pytest.mark.parametrize("subdomain", [1, 2]) def test_cell_subdomain(subdomain): from os.path import abspath, dirname, join mesh = Mesh(join(abspath(dirname(__file__)), "..", "meshes", "cell-sets.msh")) V = FunctionSpace(mesh, "DG", 0) expect = interpolate(as_ufl(1), V, subset=mesh.cell_subset(subdomain)) f = Function(V) domain = "{[i]: 0 <= i < f.dofs}" instructions = """ for i f[i, 0] = 1.0 end """ par_loop((domain, instructions), dx(subdomain), {'f': (f, WRITE)}, is_loopy_kernel=True) > assert np.allclose(f.dat.data, expect.dat.data) tests/regression/test_par_loops.py:244: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../PyOP2/pyop2/base.py:1623: in data _trace.evaluate(set([self]), set([self])) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________________ test_cell_subdomain[2] _____________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: par_loop_kernel -------...n_32309'), Map(Set((12, 12, 12), 'Cells'), Set((12, 12, 12), 'set_9808'), 1, None, 'None_cell_node'), Access('WRITE'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3dc765a378> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('27c88d4b931ca472ec1fa9bf15df86de', , False, False, True, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('27c88d4b931ca472ec1fa9bf15df86de', , False, False, True, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/0e/b001af61e014e8cc72feac8cf32607.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/0e/b001af61e014e8cc72feac8cf32607.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: subdomain = 2 @pytest.mark.parametrize("subdomain", [1, 2]) def test_cell_subdomain(subdomain): from os.path import abspath, dirname, join mesh = Mesh(join(abspath(dirname(__file__)), "..", "meshes", "cell-sets.msh")) V = FunctionSpace(mesh, "DG", 0) expect = interpolate(as_ufl(1), V, subset=mesh.cell_subset(subdomain)) f = Function(V) domain = "{[i]: 0 <= i < f.dofs}" instructions = """ for i f[i, 0] = 1.0 end """ par_loop((domain, instructions), dx(subdomain), {'f': (f, WRITE)}, is_loopy_kernel=True) > assert np.allclose(f.dat.data, expect.dat.data) tests/regression/test_par_loops.py:244: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../PyOP2/pyop2/base.py:1623: in data _trace.evaluate(set([self]), set([self])) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________________ test_walk_facets_rt ______________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: par_loop_kernel -------...(Set((21, 21, 21), 'IntFacets'), Set((33, 33, 33), 'set_9813'), 6, None, 'None_interior_facet_node'), Access('WRITE'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d54eea0d0> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('d0b99705c3005e4da8da817e258dcb43', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('d0b99705c3005e4da8da817e258dcb43', , False, False, False, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/f1/c2a78f2db60fad376dca6b84b59975.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/f1/c2a78f2db60fad376dca6b84b59975.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: def test_walk_facets_rt(): m = UnitSquareMesh(3, 3) x = SpatialCoordinate(m) V = FunctionSpace(m, 'RT', 1) f1 = Function(V) f2 = Function(V) project(as_vector((x[0], x[1])), f1) domain = "{[i]: 0 <= i < f1.dofs}" instructions = """ for i f2[i, 0] = f1[i, 0] end """ par_loop((domain, instructions), dS, {'f1': (f1, READ), 'f2': (f2, WRITE)}, is_loopy_kernel=True) par_loop((domain, instructions), ds, {'f1': (f1, READ), 'f2': (f2, WRITE)}, is_loopy_kernel=True) > assert errornorm(f1, f2, degree_rise=0) < 1e-10 tests/regression/test_par_loops.py:269: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/norms.py:36: in errornorm return norm(u - uh, norm_type=norm_type, mesh=mesh) firedrake/norms.py:77: in norm return assemble((expr**(p/2))*dx)**(1/p) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_cr_facet_integral_parallel ________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________ test_kernel_with_det_of_tensor_of_derivatives_of_field _____________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________________ test_partially_mixed_mat[Vector-nest] _____________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form01_cell_integral_ot..., 'Coordinates'), Map(Set((8, 8, 8), 'Cells'), Set((9, 9, 9), 'set_9815'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d98088488> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('6ffed5140ecb2115ef8951286f2fd2f9', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('6ffed5140ecb2115ef8951286f2fd2f9', , False, False, False, , Access('INC'), (, dtype('float64'), (((2, 2),),)), ((, 1, None), (, 1, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/75/a42e85b7ea07a67b12b066f3276a69.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/75/a42e85b7ea07a67b12b066f3276a69.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: V = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', triangle, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32317)) Q = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Discon...Lagrange', triangle, 0), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32317)) mat_type = 'nest', scalar = False @pytest.mark.parametrize("mat_type", ["nest", "aij"]) @pytest.mark.parametrize("scalar", [False, True], ids=["Vector", "Scalar"]) def test_partially_mixed_mat(V, Q, mat_type, scalar): W = V*Q u, p = TrialFunctions(W) if scalar: v = TestFunction(V) a = inner(u, v)*dx idx = 0, 0 other = 0, 1 else: q = TestFunction(Q) a = inner(p, q)*dx idx = 0, 1 other = 0, 0 > A = assemble(a, mat_type=mat_type).M tests/regression/test_partially_mixed_mat.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/matrix.py:133: in M self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________________ test_partially_mixed_mat[Vector-aij] ______________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form01_cell_integral_ot..., 'Coordinates'), Map(Set((8, 8, 8), 'Cells'), Set((9, 9, 9), 'set_9820'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d5df1b6a8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('6ffed5140ecb2115ef8951286f2fd2f9', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('6ffed5140ecb2115ef8951286f2fd2f9', , False, False, False, , Access('INC'), (, dtype('float64'), (((2, 2),),)), ((, 1, None), (, 1, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/03/9b0e9462ad9f9eb31f00962a782a28.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/03/9b0e9462ad9f9eb31f00962a782a28.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: V = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', triangle, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32319)) Q = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Discon...Lagrange', triangle, 0), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32319)) mat_type = 'aij', scalar = False @pytest.mark.parametrize("mat_type", ["nest", "aij"]) @pytest.mark.parametrize("scalar", [False, True], ids=["Vector", "Scalar"]) def test_partially_mixed_mat(V, Q, mat_type, scalar): W = V*Q u, p = TrialFunctions(W) if scalar: v = TestFunction(V) a = inner(u, v)*dx idx = 0, 0 other = 0, 1 else: q = TestFunction(Q) a = inner(p, q)*dx idx = 0, 1 other = 0, 0 > A = assemble(a, mat_type=mat_type).M tests/regression/test_partially_mixed_mat.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/matrix.py:133: in M self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________________ test_partially_mixed_mat[Scalar-nest] _____________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form00_cell_integral_ot..., 'Coordinates'), Map(Set((8, 8, 8), 'Cells'), Set((9, 9, 9), 'set_9825'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3e12e2bd90> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('a97de5202fbea5edd0e2c4676684aad2', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('a97de5202fbea5edd0e2c4676684aad2', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 1, None), (, 1, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/de/b0da090b92d172b11f7adb4fc816eb.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/de/b0da090b92d172b11f7adb4fc816eb.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: V = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', triangle, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32321)) Q = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Discon...Lagrange', triangle, 0), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32321)) mat_type = 'nest', scalar = True @pytest.mark.parametrize("mat_type", ["nest", "aij"]) @pytest.mark.parametrize("scalar", [False, True], ids=["Vector", "Scalar"]) def test_partially_mixed_mat(V, Q, mat_type, scalar): W = V*Q u, p = TrialFunctions(W) if scalar: v = TestFunction(V) a = inner(u, v)*dx idx = 0, 0 other = 0, 1 else: q = TestFunction(Q) a = inner(p, q)*dx idx = 0, 1 other = 0, 0 > A = assemble(a, mat_type=mat_type).M tests/regression/test_partially_mixed_mat.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/matrix.py:133: in M self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________________ test_partially_mixed_mat[Scalar-aij] ______________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form00_cell_integral_ot..., 'Coordinates'), Map(Set((8, 8, 8), 'Cells'), Set((9, 9, 9), 'set_9830'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3e40f268c8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('a97de5202fbea5edd0e2c4676684aad2', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('a97de5202fbea5edd0e2c4676684aad2', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 1, None), (, 1, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/ed/95286a992ddeccdcff1c5a07fa8d51.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/ed/95286a992ddeccdcff1c5a07fa8d51.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: V = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', triangle, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32323)) Q = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Discon...Lagrange', triangle, 0), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32323)) mat_type = 'aij', scalar = True @pytest.mark.parametrize("mat_type", ["nest", "aij"]) @pytest.mark.parametrize("scalar", [False, True], ids=["Vector", "Scalar"]) def test_partially_mixed_mat(V, Q, mat_type, scalar): W = V*Q u, p = TrialFunctions(W) if scalar: v = TestFunction(V) a = inner(u, v)*dx idx = 0, 0 other = 0, 1 else: q = TestFunction(Q) a = inner(p, q)*dx idx = 0, 1 other = 0, 0 > A = assemble(a, mat_type=mat_type).M tests/regression/test_partially_mixed_mat.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/matrix.py:133: in M self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________ test_jacobi_sor_equivalence[Interval-scalar-True] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 32325), problem_type = 'scalar', multiplicative = True def test_jacobi_sor_equivalence(mesh, problem_type, multiplicative): if problem_type == "scalar": V = FunctionSpace(mesh, "CG", 1) elif problem_type == "vector": V = VectorFunctionSpace(mesh, "CG", 1) elif problem_type == "tensor": V = TensorFunctionSpace(mesh, "CG", 1) elif problem_type == "mixed": P = FunctionSpace(mesh, "CG", 1) Q = VectorFunctionSpace(mesh, "CG", 1) R = TensorFunctionSpace(mesh, "CG", 1) V = P*Q*R shape = V.ufl_element().value_shape() rhs = numpy.full(shape, 1, dtype=float) u = TrialFunction(V) v = TestFunction(V) a = inner(grad(u), grad(v))*dx L = inner(Constant(rhs), v)*dx if problem_type == "mixed": bcs = [DirichletBC(Q, zero(Q.ufl_element().value_shape()), "on_boundary") for Q in V.split()] else: bcs = DirichletBC(V, zero(V.ufl_element().value_shape()), "on_boundary") uh = Function(V) problem = LinearVariationalProblem(a, L, uh, bcs=bcs) jacobi = LinearVariationalSolver(problem, solver_parameters={"ksp_type": "cg", "pc_type": "sor" if multiplicative else "jacobi", "ksp_monitor": None, "mat_type": "aij"}) jacobi.snes.ksp.setConvergenceHistory() > jacobi.solve() tests/regression/test_patch_pc.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/variational_solver.py:264: in solve self.snes.solve(None, work) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E petsc4py.PETSc.Error: error code 75 E [0] SNESSolve() line 4560 in /tmp/pip-req-build-eqqddqg6/src/snes/interface/snes.c E [0] SNESSolve_KSPONLY() line 48 in /tmp/pip-req-build-eqqddqg6/src/snes/impls/ksponly/ksponly.c E [0] KSPSolve() line 782 in /tmp/pip-req-build-eqqddqg6/src/ksp/ksp/interface/itfunc.c E [0] KSPSolve_CG() line 133 in /tmp/pip-req-build-eqqddqg6/src/ksp/ksp/impls/cg/cg.c E [0] KSP_PCApply() line 281 in /tmp/pip-req-build-eqqddqg6/include/petsc/private/kspimpl.h E [0] PCApply() line 462 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/interface/precon.c E [0] PCApply_SOR() line 31 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/impls/sor/sor.c E [0] MatSOR() line 4028 in /tmp/pip-req-build-eqqddqg6/src/mat/interface/matrix.c E [0] MatSOR_SeqAIJ() line 1756 in /tmp/pip-req-build-eqqddqg6/src/mat/impls/aij/seq/aij.c E [0] MatInvertDiagonal_SeqAIJ() line 1725 in /tmp/pip-req-build-eqqddqg6/src/mat/impls/aij/seq/aij.c E [0] Arguments are incompatible E [0] Zero diagonal on row 0 PETSc/SNES.pyx:555: Error ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('6b29fc992cd893b511fab77ab70463bb', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/39/c04e067dbed9e68e537b15dc3e2165.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('510d5c8d8121ccb7bbd8d37f621e95a5', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 2, None), (, 2, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/f4/78f7c871306b09f13ea7bdcf58dec4.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 295, in form_jacobian ctx._jac.force_evaluation() File "/home/simone/firedrake/src/firedrake/firedrake/matrix.py", line 138, in force_evaluation self._M._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _______________________________________________ test_jacobi_sor_equivalence[Interval-vector-True] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 32342), problem_type = 'vector', multiplicative = True def test_jacobi_sor_equivalence(mesh, problem_type, multiplicative): if problem_type == "scalar": V = FunctionSpace(mesh, "CG", 1) elif problem_type == "vector": V = VectorFunctionSpace(mesh, "CG", 1) elif problem_type == "tensor": V = TensorFunctionSpace(mesh, "CG", 1) elif problem_type == "mixed": P = FunctionSpace(mesh, "CG", 1) Q = VectorFunctionSpace(mesh, "CG", 1) R = TensorFunctionSpace(mesh, "CG", 1) V = P*Q*R shape = V.ufl_element().value_shape() rhs = numpy.full(shape, 1, dtype=float) u = TrialFunction(V) v = TestFunction(V) a = inner(grad(u), grad(v))*dx L = inner(Constant(rhs), v)*dx if problem_type == "mixed": bcs = [DirichletBC(Q, zero(Q.ufl_element().value_shape()), "on_boundary") for Q in V.split()] else: bcs = DirichletBC(V, zero(V.ufl_element().value_shape()), "on_boundary") uh = Function(V) problem = LinearVariationalProblem(a, L, uh, bcs=bcs) jacobi = LinearVariationalSolver(problem, solver_parameters={"ksp_type": "cg", "pc_type": "sor" if multiplicative else "jacobi", "ksp_monitor": None, "mat_type": "aij"}) jacobi.snes.ksp.setConvergenceHistory() > jacobi.solve() tests/regression/test_patch_pc.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/variational_solver.py:264: in solve self.snes.solve(None, work) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E petsc4py.PETSc.Error: error code 75 E [0] SNESSolve() line 4560 in /tmp/pip-req-build-eqqddqg6/src/snes/interface/snes.c E [0] SNESSolve_KSPONLY() line 48 in /tmp/pip-req-build-eqqddqg6/src/snes/impls/ksponly/ksponly.c E [0] KSPSolve() line 782 in /tmp/pip-req-build-eqqddqg6/src/ksp/ksp/interface/itfunc.c E [0] KSPSolve_CG() line 133 in /tmp/pip-req-build-eqqddqg6/src/ksp/ksp/impls/cg/cg.c E [0] KSP_PCApply() line 281 in /tmp/pip-req-build-eqqddqg6/include/petsc/private/kspimpl.h E [0] PCApply() line 462 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/interface/precon.c E [0] PCApply_SOR() line 31 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/impls/sor/sor.c E [0] MatSOR() line 4028 in /tmp/pip-req-build-eqqddqg6/src/mat/interface/matrix.c E [0] MatSOR_SeqAIJ() line 1756 in /tmp/pip-req-build-eqqddqg6/src/mat/impls/aij/seq/aij.c E [0] MatInvertDiagonal_SeqAIJ() line 1725 in /tmp/pip-req-build-eqqddqg6/src/mat/impls/aij/seq/aij.c E [0] Arguments are incompatible E [0] Zero diagonal on row 0 PETSc/SNES.pyx:555: Error ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('ecf415492132273689d73fe107f181fb', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/86/3917da9de972b42a9f9abfa88270de.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('094f5652ce02743d9fe5a185be22321a', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 2, None), (, 2, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/90/9c75a5a7e4d8db69599c3feae1ad39.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 295, in form_jacobian ctx._jac.force_evaluation() File "/home/simone/firedrake/src/firedrake/firedrake/matrix.py", line 138, in force_evaluation self._M._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _______________________________________________ test_jacobi_sor_equivalence[Interval-tensor-True] _______________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression ------------...((4, 4, 4), 'set_9855'), (1, 1), 'None_nodes_dset'), None, dtype('float64'), 'function_32361'), None, Access('WRITE'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3db9ac6268> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('ea670a06128bd5d91cc87aea85abc6ff', , False, False, True, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('ea670a06128bd5d91cc87aea85abc6ff', , False, False, True, , Access('WRITE'), (, dtype('float64'), (, (1, 1), (,))), None, False, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/97/57046e72f11bae86f5d0f7d44d482b.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/97/57046e72f11bae86f5d0f7d44d482b.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 32359), problem_type = 'tensor', multiplicative = True def test_jacobi_sor_equivalence(mesh, problem_type, multiplicative): if problem_type == "scalar": V = FunctionSpace(mesh, "CG", 1) elif problem_type == "vector": V = VectorFunctionSpace(mesh, "CG", 1) elif problem_type == "tensor": V = TensorFunctionSpace(mesh, "CG", 1) elif problem_type == "mixed": P = FunctionSpace(mesh, "CG", 1) Q = VectorFunctionSpace(mesh, "CG", 1) R = TensorFunctionSpace(mesh, "CG", 1) V = P*Q*R shape = V.ufl_element().value_shape() rhs = numpy.full(shape, 1, dtype=float) u = TrialFunction(V) v = TestFunction(V) a = inner(grad(u), grad(v))*dx L = inner(Constant(rhs), v)*dx if problem_type == "mixed": bcs = [DirichletBC(Q, zero(Q.ufl_element().value_shape()), "on_boundary") for Q in V.split()] else: bcs = DirichletBC(V, zero(V.ufl_element().value_shape()), "on_boundary") uh = Function(V) problem = LinearVariationalProblem(a, L, uh, bcs=bcs) jacobi = LinearVariationalSolver(problem, solver_parameters={"ksp_type": "cg", "pc_type": "sor" if multiplicative else "jacobi", "ksp_monitor": None, "mat_type": "aij"}) jacobi.snes.ksp.setConvergenceHistory() > jacobi.solve() tests/regression/test_patch_pc.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/variational_solver.py:256: in solve with self._problem.u.dat.vec as u: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________ test_jacobi_sor_equivalence[Interval-tensor-False] _______________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression ------------...((4, 4, 4), 'set_9859'), (1, 1), 'None_nodes_dset'), None, dtype('float64'), 'function_32366'), None, Access('WRITE'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d54e1d950> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('ea670a06128bd5d91cc87aea85abc6ff', , False, False, True, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('ea670a06128bd5d91cc87aea85abc6ff', , False, False, True, , Access('WRITE'), (, dtype('float64'), (, (1, 1), (,))), None, False, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/97/57046e72f11bae86f5d0f7d44d482b.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/97/57046e72f11bae86f5d0f7d44d482b.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 32364), problem_type = 'tensor', multiplicative = False def test_jacobi_sor_equivalence(mesh, problem_type, multiplicative): if problem_type == "scalar": V = FunctionSpace(mesh, "CG", 1) elif problem_type == "vector": V = VectorFunctionSpace(mesh, "CG", 1) elif problem_type == "tensor": V = TensorFunctionSpace(mesh, "CG", 1) elif problem_type == "mixed": P = FunctionSpace(mesh, "CG", 1) Q = VectorFunctionSpace(mesh, "CG", 1) R = TensorFunctionSpace(mesh, "CG", 1) V = P*Q*R shape = V.ufl_element().value_shape() rhs = numpy.full(shape, 1, dtype=float) u = TrialFunction(V) v = TestFunction(V) a = inner(grad(u), grad(v))*dx L = inner(Constant(rhs), v)*dx if problem_type == "mixed": bcs = [DirichletBC(Q, zero(Q.ufl_element().value_shape()), "on_boundary") for Q in V.split()] else: bcs = DirichletBC(V, zero(V.ufl_element().value_shape()), "on_boundary") uh = Function(V) problem = LinearVariationalProblem(a, L, uh, bcs=bcs) jacobi = LinearVariationalSolver(problem, solver_parameters={"ksp_type": "cg", "pc_type": "sor" if multiplicative else "jacobi", "ksp_monitor": None, "mat_type": "aij"}) jacobi.snes.ksp.setConvergenceHistory() > jacobi.solve() tests/regression/test_patch_pc.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/variational_solver.py:256: in solve with self._problem.u.dat.vec as u: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________ test_jacobi_sor_equivalence[Interval-mixed-True] ________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression ------------...4), 'set_9863'), (1, 1), 'None_nodes_dset'), None, dtype('float64'), 'function_32371[cmpt-2]'), None, Access('WRITE'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d54e17378> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('ea670a06128bd5d91cc87aea85abc6ff', , False, False, True, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('ea670a06128bd5d91cc87aea85abc6ff', , False, False, True, , Access('WRITE'), (, dtype('float64'), (, (1, 1), (,))), None, False, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/97/57046e72f11bae86f5d0f7d44d482b.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/97/57046e72f11bae86f5d0f7d44d482b.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 32369), problem_type = 'mixed', multiplicative = True def test_jacobi_sor_equivalence(mesh, problem_type, multiplicative): if problem_type == "scalar": V = FunctionSpace(mesh, "CG", 1) elif problem_type == "vector": V = VectorFunctionSpace(mesh, "CG", 1) elif problem_type == "tensor": V = TensorFunctionSpace(mesh, "CG", 1) elif problem_type == "mixed": P = FunctionSpace(mesh, "CG", 1) Q = VectorFunctionSpace(mesh, "CG", 1) R = TensorFunctionSpace(mesh, "CG", 1) V = P*Q*R shape = V.ufl_element().value_shape() rhs = numpy.full(shape, 1, dtype=float) u = TrialFunction(V) v = TestFunction(V) a = inner(grad(u), grad(v))*dx L = inner(Constant(rhs), v)*dx if problem_type == "mixed": bcs = [DirichletBC(Q, zero(Q.ufl_element().value_shape()), "on_boundary") for Q in V.split()] else: bcs = DirichletBC(V, zero(V.ufl_element().value_shape()), "on_boundary") uh = Function(V) problem = LinearVariationalProblem(a, L, uh, bcs=bcs) jacobi = LinearVariationalSolver(problem, solver_parameters={"ksp_type": "cg", "pc_type": "sor" if multiplicative else "jacobi", "ksp_monitor": None, "mat_type": "aij"}) jacobi.snes.ksp.setConvergenceHistory() > jacobi.solve() tests/regression/test_patch_pc.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/variational_solver.py:256: in solve with self._problem.u.dat.vec as u: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:412: in vecscatter with d.vec_ro as v: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________ test_jacobi_sor_equivalence[Interval-mixed-False] _______________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression ------------...4), 'set_9867'), (1, 1), 'None_nodes_dset'), None, dtype('float64'), 'function_32387[cmpt-2]'), None, Access('WRITE'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3e18c3ed08> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('ea670a06128bd5d91cc87aea85abc6ff', , False, False, True, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('ea670a06128bd5d91cc87aea85abc6ff', , False, False, True, , Access('WRITE'), (, dtype('float64'), (, (1, 1), (,))), None, False, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/97/57046e72f11bae86f5d0f7d44d482b.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/97/57046e72f11bae86f5d0f7d44d482b.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 32385), problem_type = 'mixed', multiplicative = False def test_jacobi_sor_equivalence(mesh, problem_type, multiplicative): if problem_type == "scalar": V = FunctionSpace(mesh, "CG", 1) elif problem_type == "vector": V = VectorFunctionSpace(mesh, "CG", 1) elif problem_type == "tensor": V = TensorFunctionSpace(mesh, "CG", 1) elif problem_type == "mixed": P = FunctionSpace(mesh, "CG", 1) Q = VectorFunctionSpace(mesh, "CG", 1) R = TensorFunctionSpace(mesh, "CG", 1) V = P*Q*R shape = V.ufl_element().value_shape() rhs = numpy.full(shape, 1, dtype=float) u = TrialFunction(V) v = TestFunction(V) a = inner(grad(u), grad(v))*dx L = inner(Constant(rhs), v)*dx if problem_type == "mixed": bcs = [DirichletBC(Q, zero(Q.ufl_element().value_shape()), "on_boundary") for Q in V.split()] else: bcs = DirichletBC(V, zero(V.ufl_element().value_shape()), "on_boundary") uh = Function(V) problem = LinearVariationalProblem(a, L, uh, bcs=bcs) jacobi = LinearVariationalSolver(problem, solver_parameters={"ksp_type": "cg", "pc_type": "sor" if multiplicative else "jacobi", "ksp_monitor": None, "mat_type": "aij"}) jacobi.snes.ksp.setConvergenceHistory() > jacobi.solve() tests/regression/test_patch_pc.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/variational_solver.py:256: in solve with self._problem.u.dat.vec as u: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:412: in vecscatter with d.vec_ro as v: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________ test_jacobi_sor_equivalence[Rectangle-scalar-True] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32401), problem_type = 'scalar', multiplicative = True def test_jacobi_sor_equivalence(mesh, problem_type, multiplicative): if problem_type == "scalar": V = FunctionSpace(mesh, "CG", 1) elif problem_type == "vector": V = VectorFunctionSpace(mesh, "CG", 1) elif problem_type == "tensor": V = TensorFunctionSpace(mesh, "CG", 1) elif problem_type == "mixed": P = FunctionSpace(mesh, "CG", 1) Q = VectorFunctionSpace(mesh, "CG", 1) R = TensorFunctionSpace(mesh, "CG", 1) V = P*Q*R shape = V.ufl_element().value_shape() rhs = numpy.full(shape, 1, dtype=float) u = TrialFunction(V) v = TestFunction(V) a = inner(grad(u), grad(v))*dx L = inner(Constant(rhs), v)*dx if problem_type == "mixed": bcs = [DirichletBC(Q, zero(Q.ufl_element().value_shape()), "on_boundary") for Q in V.split()] else: bcs = DirichletBC(V, zero(V.ufl_element().value_shape()), "on_boundary") uh = Function(V) problem = LinearVariationalProblem(a, L, uh, bcs=bcs) jacobi = LinearVariationalSolver(problem, solver_parameters={"ksp_type": "cg", "pc_type": "sor" if multiplicative else "jacobi", "ksp_monitor": None, "mat_type": "aij"}) jacobi.snes.ksp.setConvergenceHistory() jacobi.solve() jacobi_history = jacobi.snes.ksp.getConvergenceHistory() patch = LinearVariationalSolver(problem, options_prefix="", solver_parameters={"mat_type": "matfree", "ksp_type": "cg", "pc_type": "python", "pc_python_type": "firedrake.PatchPC", "patch_pc_patch_construct_type": "star", "patch_pc_patch_save_operators": True, "patch_pc_patch_sub_mat_type": "aij", "patch_pc_patch_local_type": "multiplicative" if multiplicative else "additive", "patch_pc_patch_symmetrise_sweep": multiplicative, "patch_sub_ksp_type": "preonly", "patch_sub_pc_type": "lu", "ksp_monitor": None}) patch.snes.ksp.setConvergenceHistory() uh.assign(0) patch.solve() patch_history = patch.snes.ksp.getConvergenceHistory() > assert numpy.allclose(jacobi_history, patch_history) E assert False E + where False = (array([3.33609326e-01, 2.77044120e-01, 1.38055133e-01, 5.36242180e-02,\n 2.25203769e-02, 6.37967173e-03, 1.382832...155e-06, 3.16162785e-06,\n 1.77415409e-06, 6.92299357e-07, 1.65678316e-07, 4.47545836e-08,\n 2.08643121e-08]), array([0.])) E + where = numpy.allclose tests/regression/test_patch_pc.py:94: AssertionError ------------------------------------------------------------- Captured stdout call -------------------------------------------------------------- Residual norms for firedrake_1459_ solve. 0 KSP Residual norm 3.336093263769e-01 1 KSP Residual norm 2.770441200747e-01 2 KSP Residual norm 1.380551330890e-01 3 KSP Residual norm 5.362421798991e-02 4 KSP Residual norm 2.252037694163e-02 5 KSP Residual norm 6.379671725812e-03 6 KSP Residual norm 1.382832068679e-03 7 KSP Residual norm 2.612075438967e-04 8 KSP Residual norm 6.009600369928e-05 9 KSP Residual norm 2.229442879581e-05 10 KSP Residual norm 8.015541546849e-06 11 KSP Residual norm 3.161627845223e-06 12 KSP Residual norm 1.774154089124e-06 13 KSP Residual norm 6.922993569760e-07 14 KSP Residual norm 1.656783158648e-07 15 KSP Residual norm 4.475458355071e-08 16 KSP Residual norm 2.086431210485e-08 Residual norms for solve. 0 KSP Residual norm 0.000000000000e+00 ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('565ea7404c23e80f07ae6c37da50f4b5', , False, False, True, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 3, None), (, 3, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/a3/0b545386f1dbca20466fc617f6ff75.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1252, in libpetsc4py.PCSetUp_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 105, in setUp super().setUp(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 45, in setUp self.initialize(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 448, in initialize Jcell_kernels, Jint_facet_kernels = matrix_funptr(J, Jstate) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 175, in matrix_funptr mod = seq.JITModule(kinfo.kernel, iterset, *args) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('565ea7404c23e80f07ae6c37da50f4b5', , False, False, True, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 3, None), (, 3, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/a3/0b545386f1dbca20466fc617f6ff75.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1252, in libpetsc4py.PCSetUp_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 105, in setUp super().setUp(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 45, in setUp self.initialize(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 448, in initialize Jcell_kernels, Jint_facet_kernels = matrix_funptr(J, Jstate) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 175, in matrix_funptr mod = seq.JITModule(kinfo.kernel, iterset, *args) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1343, in libpetsc4py.PCApply_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 687, in apply self.patch.apply(x, y) AttributeError: 'PatchPC' object has no attribute 'patch' The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ______________________________________________ test_jacobi_sor_equivalence[Rectangle-scalar-False] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32413), problem_type = 'scalar', multiplicative = False def test_jacobi_sor_equivalence(mesh, problem_type, multiplicative): if problem_type == "scalar": V = FunctionSpace(mesh, "CG", 1) elif problem_type == "vector": V = VectorFunctionSpace(mesh, "CG", 1) elif problem_type == "tensor": V = TensorFunctionSpace(mesh, "CG", 1) elif problem_type == "mixed": P = FunctionSpace(mesh, "CG", 1) Q = VectorFunctionSpace(mesh, "CG", 1) R = TensorFunctionSpace(mesh, "CG", 1) V = P*Q*R shape = V.ufl_element().value_shape() rhs = numpy.full(shape, 1, dtype=float) u = TrialFunction(V) v = TestFunction(V) a = inner(grad(u), grad(v))*dx L = inner(Constant(rhs), v)*dx if problem_type == "mixed": bcs = [DirichletBC(Q, zero(Q.ufl_element().value_shape()), "on_boundary") for Q in V.split()] else: bcs = DirichletBC(V, zero(V.ufl_element().value_shape()), "on_boundary") uh = Function(V) problem = LinearVariationalProblem(a, L, uh, bcs=bcs) jacobi = LinearVariationalSolver(problem, solver_parameters={"ksp_type": "cg", "pc_type": "sor" if multiplicative else "jacobi", "ksp_monitor": None, "mat_type": "aij"}) jacobi.snes.ksp.setConvergenceHistory() jacobi.solve() jacobi_history = jacobi.snes.ksp.getConvergenceHistory() patch = LinearVariationalSolver(problem, options_prefix="", solver_parameters={"mat_type": "matfree", "ksp_type": "cg", "pc_type": "python", "pc_python_type": "firedrake.PatchPC", "patch_pc_patch_construct_type": "star", "patch_pc_patch_save_operators": True, "patch_pc_patch_sub_mat_type": "aij", "patch_pc_patch_local_type": "multiplicative" if multiplicative else "additive", "patch_pc_patch_symmetrise_sweep": multiplicative, "patch_sub_ksp_type": "preonly", "patch_sub_pc_type": "lu", "ksp_monitor": None}) patch.snes.ksp.setConvergenceHistory() uh.assign(0) patch.solve() patch_history = patch.snes.ksp.getConvergenceHistory() > assert numpy.allclose(jacobi_history, patch_history) E assert False E + where False = (array([9.41522172e-02, 1.57764819e-01, 1.37787236e-01, 1.10148159e-01,\n 9.23726972e-02, 6.66985743e-02, 4.569533...371e-06,\n 9.70130537e-07, 4.70289454e-07, 1.51485719e-07, 4.68118104e-08,\n 1.76382939e-08, 4.16256943e-09]), array([0.])) E + where = numpy.allclose tests/regression/test_patch_pc.py:94: AssertionError ------------------------------------------------------------- Captured stdout call -------------------------------------------------------------- Residual norms for firedrake_1460_ solve. 0 KSP Residual norm 9.415221718048e-02 1 KSP Residual norm 1.577648192334e-01 2 KSP Residual norm 1.377872360635e-01 3 KSP Residual norm 1.101481594357e-01 4 KSP Residual norm 9.237269716198e-02 5 KSP Residual norm 6.669857427969e-02 6 KSP Residual norm 4.569533399973e-02 7 KSP Residual norm 3.046817732507e-02 8 KSP Residual norm 2.242052475096e-02 9 KSP Residual norm 1.938638153260e-02 10 KSP Residual norm 1.297526020412e-02 11 KSP Residual norm 6.419082949571e-03 12 KSP Residual norm 3.819721340853e-03 13 KSP Residual norm 3.210979048805e-03 14 KSP Residual norm 1.661522394530e-03 15 KSP Residual norm 7.061712724175e-04 16 KSP Residual norm 3.324856547778e-04 17 KSP Residual norm 1.284224712576e-04 18 KSP Residual norm 6.914319015439e-05 19 KSP Residual norm 3.390251830844e-05 20 KSP Residual norm 2.059785344776e-05 21 KSP Residual norm 9.866461765445e-06 22 KSP Residual norm 4.826402950505e-06 23 KSP Residual norm 2.583603712343e-06 24 KSP Residual norm 9.701305372792e-07 25 KSP Residual norm 4.702894538112e-07 26 KSP Residual norm 1.514857187139e-07 27 KSP Residual norm 4.681181040075e-08 28 KSP Residual norm 1.763829391885e-08 29 KSP Residual norm 4.162569426958e-09 Residual norms for solve. 0 KSP Residual norm 0.000000000000e+00 ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('565ea7404c23e80f07ae6c37da50f4b5', , False, False, True, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 3, None), (, 3, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/a3/0b545386f1dbca20466fc617f6ff75.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1252, in libpetsc4py.PCSetUp_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 105, in setUp super().setUp(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 45, in setUp self.initialize(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 448, in initialize Jcell_kernels, Jint_facet_kernels = matrix_funptr(J, Jstate) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 175, in matrix_funptr mod = seq.JITModule(kinfo.kernel, iterset, *args) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('565ea7404c23e80f07ae6c37da50f4b5', , False, False, True, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 3, None), (, 3, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/a3/0b545386f1dbca20466fc617f6ff75.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1252, in libpetsc4py.PCSetUp_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 105, in setUp super().setUp(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/base.py", line 45, in setUp self.initialize(pc) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 448, in initialize Jcell_kernels, Jint_facet_kernels = matrix_funptr(J, Jstate) File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 175, in matrix_funptr mod = seq.JITModule(kinfo.kernel, iterset, *args) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "libpetsc4py/libpetsc4py.pyx", line 1343, in libpetsc4py.PCApply_Python File "/home/simone/firedrake/src/firedrake/firedrake/preconditioners/patch.py", line 687, in apply self.patch.apply(x, y) AttributeError: 'PatchPC' object has no attribute 'patch' The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ______________________________________________ test_jacobi_sor_equivalence[Rectangle-tensor-True] _______________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression ------------... 231, 231), 'set_9895'), (2, 2), 'None_nodes_dset'), None, dtype('float64'), 'function_32451'), None, Access('WRITE'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3dc917e598> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('4eded89374c4b1dd78ec801e5b52fbb6', , False, False, True, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('4eded89374c4b1dd78ec801e5b52fbb6', , False, False, True, , Access('WRITE'), (, dtype('float64'), (, (2, 2), (,))), None, False, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/30/2725b0ce1cc071a44a55817f31ca4e.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/30/2725b0ce1cc071a44a55817f31ca4e.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32449), problem_type = 'tensor', multiplicative = True def test_jacobi_sor_equivalence(mesh, problem_type, multiplicative): if problem_type == "scalar": V = FunctionSpace(mesh, "CG", 1) elif problem_type == "vector": V = VectorFunctionSpace(mesh, "CG", 1) elif problem_type == "tensor": V = TensorFunctionSpace(mesh, "CG", 1) elif problem_type == "mixed": P = FunctionSpace(mesh, "CG", 1) Q = VectorFunctionSpace(mesh, "CG", 1) R = TensorFunctionSpace(mesh, "CG", 1) V = P*Q*R shape = V.ufl_element().value_shape() rhs = numpy.full(shape, 1, dtype=float) u = TrialFunction(V) v = TestFunction(V) a = inner(grad(u), grad(v))*dx L = inner(Constant(rhs), v)*dx if problem_type == "mixed": bcs = [DirichletBC(Q, zero(Q.ufl_element().value_shape()), "on_boundary") for Q in V.split()] else: bcs = DirichletBC(V, zero(V.ufl_element().value_shape()), "on_boundary") uh = Function(V) problem = LinearVariationalProblem(a, L, uh, bcs=bcs) jacobi = LinearVariationalSolver(problem, solver_parameters={"ksp_type": "cg", "pc_type": "sor" if multiplicative else "jacobi", "ksp_monitor": None, "mat_type": "aij"}) jacobi.snes.ksp.setConvergenceHistory() > jacobi.solve() tests/regression/test_patch_pc.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/variational_solver.py:256: in solve with self._problem.u.dat.vec as u: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________ test_jacobi_sor_equivalence[Rectangle-tensor-False] ______________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression ------------... 231, 231), 'set_9899'), (2, 2), 'None_nodes_dset'), None, dtype('float64'), 'function_32456'), None, Access('WRITE'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d6875fea0> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('4eded89374c4b1dd78ec801e5b52fbb6', , False, False, True, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('4eded89374c4b1dd78ec801e5b52fbb6', , False, False, True, , Access('WRITE'), (, dtype('float64'), (, (2, 2), (,))), None, False, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/30/2725b0ce1cc071a44a55817f31ca4e.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/30/2725b0ce1cc071a44a55817f31ca4e.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32454), problem_type = 'tensor', multiplicative = False def test_jacobi_sor_equivalence(mesh, problem_type, multiplicative): if problem_type == "scalar": V = FunctionSpace(mesh, "CG", 1) elif problem_type == "vector": V = VectorFunctionSpace(mesh, "CG", 1) elif problem_type == "tensor": V = TensorFunctionSpace(mesh, "CG", 1) elif problem_type == "mixed": P = FunctionSpace(mesh, "CG", 1) Q = VectorFunctionSpace(mesh, "CG", 1) R = TensorFunctionSpace(mesh, "CG", 1) V = P*Q*R shape = V.ufl_element().value_shape() rhs = numpy.full(shape, 1, dtype=float) u = TrialFunction(V) v = TestFunction(V) a = inner(grad(u), grad(v))*dx L = inner(Constant(rhs), v)*dx if problem_type == "mixed": bcs = [DirichletBC(Q, zero(Q.ufl_element().value_shape()), "on_boundary") for Q in V.split()] else: bcs = DirichletBC(V, zero(V.ufl_element().value_shape()), "on_boundary") uh = Function(V) problem = LinearVariationalProblem(a, L, uh, bcs=bcs) jacobi = LinearVariationalSolver(problem, solver_parameters={"ksp_type": "cg", "pc_type": "sor" if multiplicative else "jacobi", "ksp_monitor": None, "mat_type": "aij"}) jacobi.snes.ksp.setConvergenceHistory() > jacobi.solve() tests/regression/test_patch_pc.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/variational_solver.py:256: in solve with self._problem.u.dat.vec as u: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________ test_jacobi_sor_equivalence[Rectangle-mixed-True] _______________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression ------------...1), 'set_9903'), (2, 2), 'None_nodes_dset'), None, dtype('float64'), 'function_32461[cmpt-2]'), None, Access('WRITE'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d514f4488> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('4eded89374c4b1dd78ec801e5b52fbb6', , False, False, True, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('4eded89374c4b1dd78ec801e5b52fbb6', , False, False, True, , Access('WRITE'), (, dtype('float64'), (, (2, 2), (,))), None, False, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/30/2725b0ce1cc071a44a55817f31ca4e.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/30/2725b0ce1cc071a44a55817f31ca4e.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32459), problem_type = 'mixed', multiplicative = True def test_jacobi_sor_equivalence(mesh, problem_type, multiplicative): if problem_type == "scalar": V = FunctionSpace(mesh, "CG", 1) elif problem_type == "vector": V = VectorFunctionSpace(mesh, "CG", 1) elif problem_type == "tensor": V = TensorFunctionSpace(mesh, "CG", 1) elif problem_type == "mixed": P = FunctionSpace(mesh, "CG", 1) Q = VectorFunctionSpace(mesh, "CG", 1) R = TensorFunctionSpace(mesh, "CG", 1) V = P*Q*R shape = V.ufl_element().value_shape() rhs = numpy.full(shape, 1, dtype=float) u = TrialFunction(V) v = TestFunction(V) a = inner(grad(u), grad(v))*dx L = inner(Constant(rhs), v)*dx if problem_type == "mixed": bcs = [DirichletBC(Q, zero(Q.ufl_element().value_shape()), "on_boundary") for Q in V.split()] else: bcs = DirichletBC(V, zero(V.ufl_element().value_shape()), "on_boundary") uh = Function(V) problem = LinearVariationalProblem(a, L, uh, bcs=bcs) jacobi = LinearVariationalSolver(problem, solver_parameters={"ksp_type": "cg", "pc_type": "sor" if multiplicative else "jacobi", "ksp_monitor": None, "mat_type": "aij"}) jacobi.snes.ksp.setConvergenceHistory() > jacobi.solve() tests/regression/test_patch_pc.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/variational_solver.py:256: in solve with self._problem.u.dat.vec as u: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:412: in vecscatter with d.vec_ro as v: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________ test_jacobi_sor_equivalence[Rectangle-mixed-False] _______________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression ------------...1), 'set_9907'), (2, 2), 'None_nodes_dset'), None, dtype('float64'), 'function_32477[cmpt-2]'), None, Access('WRITE'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3db8fa0048> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('4eded89374c4b1dd78ec801e5b52fbb6', , False, False, True, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('4eded89374c4b1dd78ec801e5b52fbb6', , False, False, True, , Access('WRITE'), (, dtype('float64'), (, (2, 2), (,))), None, False, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/30/2725b0ce1cc071a44a55817f31ca4e.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/30/2725b0ce1cc071a44a55817f31ca4e.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32475), problem_type = 'mixed', multiplicative = False def test_jacobi_sor_equivalence(mesh, problem_type, multiplicative): if problem_type == "scalar": V = FunctionSpace(mesh, "CG", 1) elif problem_type == "vector": V = VectorFunctionSpace(mesh, "CG", 1) elif problem_type == "tensor": V = TensorFunctionSpace(mesh, "CG", 1) elif problem_type == "mixed": P = FunctionSpace(mesh, "CG", 1) Q = VectorFunctionSpace(mesh, "CG", 1) R = TensorFunctionSpace(mesh, "CG", 1) V = P*Q*R shape = V.ufl_element().value_shape() rhs = numpy.full(shape, 1, dtype=float) u = TrialFunction(V) v = TestFunction(V) a = inner(grad(u), grad(v))*dx L = inner(Constant(rhs), v)*dx if problem_type == "mixed": bcs = [DirichletBC(Q, zero(Q.ufl_element().value_shape()), "on_boundary") for Q in V.split()] else: bcs = DirichletBC(V, zero(V.ufl_element().value_shape()), "on_boundary") uh = Function(V) problem = LinearVariationalProblem(a, L, uh, bcs=bcs) jacobi = LinearVariationalSolver(problem, solver_parameters={"ksp_type": "cg", "pc_type": "sor" if multiplicative else "jacobi", "ksp_monitor": None, "mat_type": "aij"}) jacobi.snes.ksp.setConvergenceHistory() > jacobi.solve() tests/regression/test_patch_pc.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/variational_solver.py:256: in solve with self._problem.u.dat.vec as u: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:412: in vecscatter with d.vec_ro as v: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________ test_jacobi_sor_equivalence[Box-scalar-True] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 32491), problem_type = 'scalar', multiplicative = True def test_jacobi_sor_equivalence(mesh, problem_type, multiplicative): if problem_type == "scalar": V = FunctionSpace(mesh, "CG", 1) elif problem_type == "vector": V = VectorFunctionSpace(mesh, "CG", 1) elif problem_type == "tensor": V = TensorFunctionSpace(mesh, "CG", 1) elif problem_type == "mixed": P = FunctionSpace(mesh, "CG", 1) Q = VectorFunctionSpace(mesh, "CG", 1) R = TensorFunctionSpace(mesh, "CG", 1) V = P*Q*R shape = V.ufl_element().value_shape() rhs = numpy.full(shape, 1, dtype=float) u = TrialFunction(V) v = TestFunction(V) a = inner(grad(u), grad(v))*dx L = inner(Constant(rhs), v)*dx if problem_type == "mixed": bcs = [DirichletBC(Q, zero(Q.ufl_element().value_shape()), "on_boundary") for Q in V.split()] else: bcs = DirichletBC(V, zero(V.ufl_element().value_shape()), "on_boundary") uh = Function(V) problem = LinearVariationalProblem(a, L, uh, bcs=bcs) jacobi = LinearVariationalSolver(problem, solver_parameters={"ksp_type": "cg", "pc_type": "sor" if multiplicative else "jacobi", "ksp_monitor": None, "mat_type": "aij"}) jacobi.snes.ksp.setConvergenceHistory() > jacobi.solve() tests/regression/test_patch_pc.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/variational_solver.py:264: in solve self.snes.solve(None, work) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E petsc4py.PETSc.Error: error code 75 E [0] SNESSolve() line 4560 in /tmp/pip-req-build-eqqddqg6/src/snes/interface/snes.c E [0] SNESSolve_KSPONLY() line 48 in /tmp/pip-req-build-eqqddqg6/src/snes/impls/ksponly/ksponly.c E [0] KSPSolve() line 782 in /tmp/pip-req-build-eqqddqg6/src/ksp/ksp/interface/itfunc.c E [0] KSPSolve_CG() line 133 in /tmp/pip-req-build-eqqddqg6/src/ksp/ksp/impls/cg/cg.c E [0] KSP_PCApply() line 281 in /tmp/pip-req-build-eqqddqg6/include/petsc/private/kspimpl.h E [0] PCApply() line 462 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/interface/precon.c E [0] PCApply_SOR() line 31 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/impls/sor/sor.c E [0] MatSOR() line 4028 in /tmp/pip-req-build-eqqddqg6/src/mat/interface/matrix.c E [0] MatSOR_SeqAIJ() line 1756 in /tmp/pip-req-build-eqqddqg6/src/mat/impls/aij/seq/aij.c E [0] MatInvertDiagonal_SeqAIJ() line 1725 in /tmp/pip-req-build-eqqddqg6/src/mat/impls/aij/seq/aij.c E [0] Arguments are incompatible E [0] Zero diagonal on row 0 PETSc/SNES.pyx:555: Error ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('8f417c02ab9b35d665b1e8aac29790a9', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/65/0ceead4ab94c777645e785bebbac58.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('9dedfb75023c8da69508f9fe5bd9e6c0', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 4, None), (, 4, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/0c/a4ea6e3c71cf1ddcb0a5eaee1b7475.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 295, in form_jacobian ctx._jac.force_evaluation() File "/home/simone/firedrake/src/firedrake/firedrake/matrix.py", line 138, in force_evaluation self._M._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________________ test_jacobi_sor_equivalence[Box-vector-True] __________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression ------------...4, 144, 144), 'set_9921'), (3,), 'None_nodes_dset'), None, dtype('float64'), 'function_32510'), None, Access('WRITE'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d68450048> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('c7c885b60a930a12d46708c964b6a950', , False, False, True, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('c7c885b60a930a12d46708c964b6a950', , False, False, True, , Access('WRITE'), (, dtype('float64'), (, (3,), (,))), None, False, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/25/a46a5d0b690877896ea94c878b65f1.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/25/a46a5d0b690877896ea94c878b65f1.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 32508), problem_type = 'vector', multiplicative = True def test_jacobi_sor_equivalence(mesh, problem_type, multiplicative): if problem_type == "scalar": V = FunctionSpace(mesh, "CG", 1) elif problem_type == "vector": V = VectorFunctionSpace(mesh, "CG", 1) elif problem_type == "tensor": V = TensorFunctionSpace(mesh, "CG", 1) elif problem_type == "mixed": P = FunctionSpace(mesh, "CG", 1) Q = VectorFunctionSpace(mesh, "CG", 1) R = TensorFunctionSpace(mesh, "CG", 1) V = P*Q*R shape = V.ufl_element().value_shape() rhs = numpy.full(shape, 1, dtype=float) u = TrialFunction(V) v = TestFunction(V) a = inner(grad(u), grad(v))*dx L = inner(Constant(rhs), v)*dx if problem_type == "mixed": bcs = [DirichletBC(Q, zero(Q.ufl_element().value_shape()), "on_boundary") for Q in V.split()] else: bcs = DirichletBC(V, zero(V.ufl_element().value_shape()), "on_boundary") uh = Function(V) problem = LinearVariationalProblem(a, L, uh, bcs=bcs) jacobi = LinearVariationalSolver(problem, solver_parameters={"ksp_type": "cg", "pc_type": "sor" if multiplicative else "jacobi", "ksp_monitor": None, "mat_type": "aij"}) jacobi.snes.ksp.setConvergenceHistory() > jacobi.solve() tests/regression/test_patch_pc.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/variational_solver.py:256: in solve with self._problem.u.dat.vec as u: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________ test_jacobi_sor_equivalence[Box-vector-False] _________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression ------------...4, 144, 144), 'set_9925'), (3,), 'None_nodes_dset'), None, dtype('float64'), 'function_32515'), None, Access('WRITE'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d60e7aea0> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('c7c885b60a930a12d46708c964b6a950', , False, False, True, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('c7c885b60a930a12d46708c964b6a950', , False, False, True, , Access('WRITE'), (, dtype('float64'), (, (3,), (,))), None, False, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/25/a46a5d0b690877896ea94c878b65f1.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/25/a46a5d0b690877896ea94c878b65f1.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 32513), problem_type = 'vector', multiplicative = False def test_jacobi_sor_equivalence(mesh, problem_type, multiplicative): if problem_type == "scalar": V = FunctionSpace(mesh, "CG", 1) elif problem_type == "vector": V = VectorFunctionSpace(mesh, "CG", 1) elif problem_type == "tensor": V = TensorFunctionSpace(mesh, "CG", 1) elif problem_type == "mixed": P = FunctionSpace(mesh, "CG", 1) Q = VectorFunctionSpace(mesh, "CG", 1) R = TensorFunctionSpace(mesh, "CG", 1) V = P*Q*R shape = V.ufl_element().value_shape() rhs = numpy.full(shape, 1, dtype=float) u = TrialFunction(V) v = TestFunction(V) a = inner(grad(u), grad(v))*dx L = inner(Constant(rhs), v)*dx if problem_type == "mixed": bcs = [DirichletBC(Q, zero(Q.ufl_element().value_shape()), "on_boundary") for Q in V.split()] else: bcs = DirichletBC(V, zero(V.ufl_element().value_shape()), "on_boundary") uh = Function(V) problem = LinearVariationalProblem(a, L, uh, bcs=bcs) jacobi = LinearVariationalSolver(problem, solver_parameters={"ksp_type": "cg", "pc_type": "sor" if multiplicative else "jacobi", "ksp_monitor": None, "mat_type": "aij"}) jacobi.snes.ksp.setConvergenceHistory() > jacobi.solve() tests/regression/test_patch_pc.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/variational_solver.py:256: in solve with self._problem.u.dat.vec as u: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________ test_jacobi_sor_equivalence[Box-tensor-True] __________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression ------------... 144, 144), 'set_9929'), (3, 3), 'None_nodes_dset'), None, dtype('float64'), 'function_32520'), None, Access('WRITE'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d60eae840> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('b3be198eeeed6ff1d6db4f68baf6d02d', , False, False, True, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('b3be198eeeed6ff1d6db4f68baf6d02d', , False, False, True, , Access('WRITE'), (, dtype('float64'), (, (3, 3), (,))), None, False, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/db/801b0808aa110cd9843d324abe28e7.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/db/801b0808aa110cd9843d324abe28e7.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 32518), problem_type = 'tensor', multiplicative = True def test_jacobi_sor_equivalence(mesh, problem_type, multiplicative): if problem_type == "scalar": V = FunctionSpace(mesh, "CG", 1) elif problem_type == "vector": V = VectorFunctionSpace(mesh, "CG", 1) elif problem_type == "tensor": V = TensorFunctionSpace(mesh, "CG", 1) elif problem_type == "mixed": P = FunctionSpace(mesh, "CG", 1) Q = VectorFunctionSpace(mesh, "CG", 1) R = TensorFunctionSpace(mesh, "CG", 1) V = P*Q*R shape = V.ufl_element().value_shape() rhs = numpy.full(shape, 1, dtype=float) u = TrialFunction(V) v = TestFunction(V) a = inner(grad(u), grad(v))*dx L = inner(Constant(rhs), v)*dx if problem_type == "mixed": bcs = [DirichletBC(Q, zero(Q.ufl_element().value_shape()), "on_boundary") for Q in V.split()] else: bcs = DirichletBC(V, zero(V.ufl_element().value_shape()), "on_boundary") uh = Function(V) problem = LinearVariationalProblem(a, L, uh, bcs=bcs) jacobi = LinearVariationalSolver(problem, solver_parameters={"ksp_type": "cg", "pc_type": "sor" if multiplicative else "jacobi", "ksp_monitor": None, "mat_type": "aij"}) jacobi.snes.ksp.setConvergenceHistory() > jacobi.solve() tests/regression/test_patch_pc.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/variational_solver.py:256: in solve with self._problem.u.dat.vec as u: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________ test_jacobi_sor_equivalence[Box-tensor-False] _________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression ------------... 144, 144), 'set_9933'), (3, 3), 'None_nodes_dset'), None, dtype('float64'), 'function_32525'), None, Access('WRITE'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d685726a8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('b3be198eeeed6ff1d6db4f68baf6d02d', , False, False, True, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('b3be198eeeed6ff1d6db4f68baf6d02d', , False, False, True, , Access('WRITE'), (, dtype('float64'), (, (3, 3), (,))), None, False, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/db/801b0808aa110cd9843d324abe28e7.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/db/801b0808aa110cd9843d324abe28e7.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 32523), problem_type = 'tensor', multiplicative = False def test_jacobi_sor_equivalence(mesh, problem_type, multiplicative): if problem_type == "scalar": V = FunctionSpace(mesh, "CG", 1) elif problem_type == "vector": V = VectorFunctionSpace(mesh, "CG", 1) elif problem_type == "tensor": V = TensorFunctionSpace(mesh, "CG", 1) elif problem_type == "mixed": P = FunctionSpace(mesh, "CG", 1) Q = VectorFunctionSpace(mesh, "CG", 1) R = TensorFunctionSpace(mesh, "CG", 1) V = P*Q*R shape = V.ufl_element().value_shape() rhs = numpy.full(shape, 1, dtype=float) u = TrialFunction(V) v = TestFunction(V) a = inner(grad(u), grad(v))*dx L = inner(Constant(rhs), v)*dx if problem_type == "mixed": bcs = [DirichletBC(Q, zero(Q.ufl_element().value_shape()), "on_boundary") for Q in V.split()] else: bcs = DirichletBC(V, zero(V.ufl_element().value_shape()), "on_boundary") uh = Function(V) problem = LinearVariationalProblem(a, L, uh, bcs=bcs) jacobi = LinearVariationalSolver(problem, solver_parameters={"ksp_type": "cg", "pc_type": "sor" if multiplicative else "jacobi", "ksp_monitor": None, "mat_type": "aij"}) jacobi.snes.ksp.setConvergenceHistory() > jacobi.solve() tests/regression/test_patch_pc.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/variational_solver.py:256: in solve with self._problem.u.dat.vec as u: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________ test_jacobi_sor_equivalence[Box-mixed-True] __________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression ------------...144), 'set_9937'), (3,), 'None_nodes_dset'), None, dtype('float64'), 'function_32530[cmpt-1]'), None, Access('WRITE'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d97552840> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('c7c885b60a930a12d46708c964b6a950', , False, False, True, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('c7c885b60a930a12d46708c964b6a950', , False, False, True, , Access('WRITE'), (, dtype('float64'), (, (3,), (,))), None, False, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/25/a46a5d0b690877896ea94c878b65f1.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/25/a46a5d0b690877896ea94c878b65f1.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 32528), problem_type = 'mixed', multiplicative = True def test_jacobi_sor_equivalence(mesh, problem_type, multiplicative): if problem_type == "scalar": V = FunctionSpace(mesh, "CG", 1) elif problem_type == "vector": V = VectorFunctionSpace(mesh, "CG", 1) elif problem_type == "tensor": V = TensorFunctionSpace(mesh, "CG", 1) elif problem_type == "mixed": P = FunctionSpace(mesh, "CG", 1) Q = VectorFunctionSpace(mesh, "CG", 1) R = TensorFunctionSpace(mesh, "CG", 1) V = P*Q*R shape = V.ufl_element().value_shape() rhs = numpy.full(shape, 1, dtype=float) u = TrialFunction(V) v = TestFunction(V) a = inner(grad(u), grad(v))*dx L = inner(Constant(rhs), v)*dx if problem_type == "mixed": bcs = [DirichletBC(Q, zero(Q.ufl_element().value_shape()), "on_boundary") for Q in V.split()] else: bcs = DirichletBC(V, zero(V.ufl_element().value_shape()), "on_boundary") uh = Function(V) problem = LinearVariationalProblem(a, L, uh, bcs=bcs) jacobi = LinearVariationalSolver(problem, solver_parameters={"ksp_type": "cg", "pc_type": "sor" if multiplicative else "jacobi", "ksp_monitor": None, "mat_type": "aij"}) jacobi.snes.ksp.setConvergenceHistory() > jacobi.solve() tests/regression/test_patch_pc.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/variational_solver.py:256: in solve with self._problem.u.dat.vec as u: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:412: in vecscatter with d.vec_ro as v: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________ test_jacobi_sor_equivalence[Box-mixed-False] __________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression ------------...144), 'set_9941'), (3,), 'None_nodes_dset'), None, dtype('float64'), 'function_32546[cmpt-1]'), None, Access('WRITE'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3e00c2a0d0> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('c7c885b60a930a12d46708c964b6a950', , False, False, True, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('c7c885b60a930a12d46708c964b6a950', , False, False, True, , Access('WRITE'), (, dtype('float64'), (, (3,), (,))), None, False, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/25/a46a5d0b690877896ea94c878b65f1.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/25/a46a5d0b690877896ea94c878b65f1.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 32544), problem_type = 'mixed', multiplicative = False def test_jacobi_sor_equivalence(mesh, problem_type, multiplicative): if problem_type == "scalar": V = FunctionSpace(mesh, "CG", 1) elif problem_type == "vector": V = VectorFunctionSpace(mesh, "CG", 1) elif problem_type == "tensor": V = TensorFunctionSpace(mesh, "CG", 1) elif problem_type == "mixed": P = FunctionSpace(mesh, "CG", 1) Q = VectorFunctionSpace(mesh, "CG", 1) R = TensorFunctionSpace(mesh, "CG", 1) V = P*Q*R shape = V.ufl_element().value_shape() rhs = numpy.full(shape, 1, dtype=float) u = TrialFunction(V) v = TestFunction(V) a = inner(grad(u), grad(v))*dx L = inner(Constant(rhs), v)*dx if problem_type == "mixed": bcs = [DirichletBC(Q, zero(Q.ufl_element().value_shape()), "on_boundary") for Q in V.split()] else: bcs = DirichletBC(V, zero(V.ufl_element().value_shape()), "on_boundary") uh = Function(V) problem = LinearVariationalProblem(a, L, uh, bcs=bcs) jacobi = LinearVariationalSolver(problem, solver_parameters={"ksp_type": "cg", "pc_type": "sor" if multiplicative else "jacobi", "ksp_monitor": None, "mat_type": "aij"}) jacobi.snes.ksp.setConvergenceHistory() > jacobi.solve() tests/regression/test_patch_pc.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/variational_solver.py:256: in solve with self._problem.u.dat.vec as u: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:412: in vecscatter with d.vec_ro as v: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_periodic_helmholtz[x-tri] _________________________________________________________ direction = 'x', quadrilateral = False def test_periodic_helmholtz(direction, quadrilateral): > run_periodic_helmholtz(direction, quadrilateral) tests/regression/test_periodic_2d.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_periodic_2d.py:57: in run_periodic_helmholtz solve(a == L, out, solver_parameters={'ksp_type': 'cg'}, bcs=bcs) firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('630fd9152ed1cf23415fcfebd81ecabe', , False, False, False, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('WRITE'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 3, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/9a/770d862b63bea0e811c76ca9b17e1e.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('58684244a52de735e70ef318585aeee5', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 3, None), (, 3, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/81/432e5b6710f099c742f28de64375c5.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 295, in form_jacobian ctx._jac.force_evaluation() File "/home/simone/firedrake/src/firedrake/firedrake/matrix.py", line 138, in force_evaluation self._M._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________________________ test_periodic_helmholtz[x-quad] ________________________________________________________ direction = 'x', quadrilateral = True def test_periodic_helmholtz(direction, quadrilateral): > run_periodic_helmholtz(direction, quadrilateral) tests/regression/test_periodic_2d.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_periodic_2d.py:57: in run_periodic_helmholtz solve(a == L, out, solver_parameters={'ksp_type': 'cg'}, bcs=bcs) firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('e6d11d6cba1f33b1f657b5c799e5ce25', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/0a/454331871fe31245e92a3f627903d3.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('8ef9718ebb5855ce3c3ce4a70bc82ba9', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 4, None), (, 4, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/a1/8c7e253667871730369cc3975e7152.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 295, in form_jacobian ctx._jac.force_evaluation() File "/home/simone/firedrake/src/firedrake/firedrake/matrix.py", line 138, in force_evaluation self._M._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________________________ test_periodic_helmholtz[y-tri] _________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: par_loop_kernel -------...(Set((12000, 12000, 12000), 'Cells'), Set((6060, 6060, 6060), 'set_9971'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d99a9aa60> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('630fd9152ed1cf23415fcfebd81ecabe', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('630fd9152ed1cf23415fcfebd81ecabe', , False, False, False, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('WRITE'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/9a/770d862b63bea0e811c76ca9b17e1e.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/9a/770d862b63bea0e811c76ca9b17e1e.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: direction = 'y', quadrilateral = False def test_periodic_helmholtz(direction, quadrilateral): > run_periodic_helmholtz(direction, quadrilateral) tests/regression/test_periodic_2d.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_periodic_2d.py:36: in run_periodic_helmholtz direction=direction) firedrake/utility_meshes.py:498: in PeriodicRectangleMesh comm=comm) firedrake/utility_meshes.py:1395: in PartiallyPeriodicRectangleMesh new_coordinates.dat.data[:] = np.dot(new_coordinates.dat.data, operator.T) ../PyOP2/pyop2/base.py:1623: in data _trace.evaluate(set([self]), set([self])) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_periodic_helmholtz[y-quad] ________________________________________________________ direction = 'y', quadrilateral = True def test_periodic_helmholtz(direction, quadrilateral): > run_periodic_helmholtz(direction, quadrilateral) tests/regression/test_periodic_2d.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_periodic_2d.py:57: in run_periodic_helmholtz solve(a == L, out, solver_parameters={'ksp_type': 'cg'}, bcs=bcs) firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('e6d11d6cba1f33b1f657b5c799e5ce25', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/0a/454331871fe31245e92a3f627903d3.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('8ef9718ebb5855ce3c3ce4a70bc82ba9', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 4, None), (, 4, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/a1/8c7e253667871730369cc3975e7152.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 295, in form_jacobian ctx._jac.force_evaluation() File "/home/simone/firedrake/src/firedrake/firedrake/matrix.py", line 138, in force_evaluation self._M._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _______________________________________________________ test_periodic_helmholtz[both-tri] _______________________________________________________ direction = 'both', quadrilateral = False def test_periodic_helmholtz(direction, quadrilateral): > run_periodic_helmholtz(direction, quadrilateral) tests/regression/test_periodic_2d.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_periodic_2d.py:57: in run_periodic_helmholtz solve(a == L, out, solver_parameters={'ksp_type': 'cg'}, bcs=bcs) firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('924e954dc0a993037fdece982065a355', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/a6/effb689b15d3a9680f792e432858a1.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('58684244a52de735e70ef318585aeee5', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 3, None), (, 3, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/81/432e5b6710f099c742f28de64375c5.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 295, in form_jacobian ctx._jac.force_evaluation() File "/home/simone/firedrake/src/firedrake/firedrake/matrix.py", line 138, in force_evaluation self._M._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ______________________________________________________ test_periodic_helmholtz[both-quad] _______________________________________________________ direction = 'both', quadrilateral = True def test_periodic_helmholtz(direction, quadrilateral): > run_periodic_helmholtz(direction, quadrilateral) tests/regression/test_periodic_2d.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_periodic_2d.py:57: in run_periodic_helmholtz solve(a == L, out, solver_parameters={'ksp_type': 'cg'}, bcs=bcs) firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('e6d11d6cba1f33b1f657b5c799e5ce25', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/0a/454331871fe31245e92a3f627903d3.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('8ef9718ebb5855ce3c3ce4a70bc82ba9', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 4, None), (, 4, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/a1/8c7e253667871730369cc3975e7152.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 295, in form_jacobian ctx._jac.force_evaluation() File "/home/simone/firedrake/src/firedrake/firedrake/matrix.py", line 138, in force_evaluation self._M._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________________________ test_periodic_helmholtz_parallel[x-tri] ____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________ test_periodic_helmholtz_parallel[x-quad] ____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________ test_periodic_helmholtz_parallel[y-tri] ____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________ test_periodic_helmholtz_parallel[y-quad] ____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________ test_periodic_helmholtz_parallel[both-tri] ___________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________ test_periodic_helmholtz_parallel[both-quad] __________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_periodic_1d_advection[DG0] ________________________________________________________ cls = args = (Kernel(""" static inline void form00_cell_integral_otherwise (double A[1][1] , const double *restrict coords ) { ...on_32670'), Map(Set((32, 32, 32), 'Cells'), Set((64, 64, 64), 'set_9994'), 2, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d6878da60> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('f37794eba2998e31167bab5343b30073', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('f37794eba2998e31167bab5343b30073', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 1, None), (, 1, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/89/20e3fa49ad9abf5c60d9ef1a610794.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/89/20e3fa49ad9abf5c60d9ef1a610794.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 0, threshold = 0.98 def test_periodic_1d_advection(degree, threshold): > l2error = run_test(degree) tests/regression/test_periodic_interval_advection.py:86: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_periodic_interval_advection.py:54: in run_test mass_inv.force_evaluation() firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________ test_periodic_1d_advection_parallel[DG0] ____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_periodic_1d_advection[DG1] ________________________________________________________ cls = args = (Kernel(""" static inline void form00_cell_integral_otherwise (double A[2][2] , const double *restrict coords ) { ...n_32678'), Map(Set((32, 32, 32), 'Cells'), Set((64, 64, 64), 'set_10000'), 2, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d6878db70> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('324f0d0adc9250523c17b6b3944a6158', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('324f0d0adc9250523c17b6b3944a6158', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 2, None), (, 2, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/48/1ec23a55510d955c972a224b9b5c11.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/48/1ec23a55510d955c972a224b9b5c11.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 1, threshold = 1.8 def test_periodic_1d_advection(degree, threshold): > l2error = run_test(degree) tests/regression/test_periodic_interval_advection.py:86: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_periodic_interval_advection.py:54: in run_test mass_inv.force_evaluation() firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________ test_periodic_1d_advection_parallel[DG1] ____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_periodic_1d_advection[DG2] ________________________________________________________ cls = args = (Kernel(""" static inline void form00_cell_integral_otherwise (double A[3][3] , const double *restrict coords ) { ...n_32686'), Map(Set((32, 32, 32), 'Cells'), Set((64, 64, 64), 'set_10005'), 2, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d6877fc80> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('82369453ca790df7c773385e85e8ed8e', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('82369453ca790df7c773385e85e8ed8e', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 3, None), (, 3, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/79/b4026690ff10f3da81068fd5ac507d.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/79/b4026690ff10f3da81068fd5ac507d.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 2, threshold = 2.9 def test_periodic_1d_advection(degree, threshold): > l2error = run_test(degree) tests/regression/test_periodic_interval_advection.py:86: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_periodic_interval_advection.py:54: in run_test mass_inv.force_evaluation() firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________ test_periodic_1d_advection_parallel[DG2] ____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_periodic_1d_advection[DG3] ________________________________________________________ cls = args = (Kernel(""" static inline void form00_cell_integral_otherwise (double A[4][4] , const double *restrict coords ) { ...n_32694'), Map(Set((32, 32, 32), 'Cells'), Set((64, 64, 64), 'set_10011'), 2, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3dbb6bea60> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('6373ef6c0762d5f46f268d0d6a8ec347', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('6373ef6c0762d5f46f268d0d6a8ec347', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 4, None), (, 4, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/5d/693bec373ca274c8dd6b12940f6167.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/5d/693bec373ca274c8dd6b12940f6167.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 3, threshold = 3.9 def test_periodic_1d_advection(degree, threshold): > l2error = run_test(degree) tests/regression/test_periodic_interval_advection.py:86: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_periodic_interval_advection.py:54: in run_test mass_inv.force_evaluation() firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________ test_periodic_1d_advection_parallel[DG3] ____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________ test_periodic_rectangle_advection[DG0-x-quad] _________________________________________________ cls = args = (Kernel(""" static inline void form00_cell_integral_otherwise (double A[1][1] , const double *restrict coords ) { ..., Map(Set((256, 256, 256), 'Cells'), Set((1024, 1024, 1024), 'set_10017'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d98075d08> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('fea5231051ad42301505ae99d997cb91', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('fea5231051ad42301505ae99d997cb91', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 1, None), (, 1, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/37/ab8d14b3ddb084dabb0b006a8a7b8f.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/37/ab8d14b3ddb084dabb0b006a8a7b8f.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 0, threshold = 0.98, direction = 'x', quadrilateral = True def test_periodic_rectangle_advection(degree, threshold, direction, quadrilateral): l2error = [] t = Constant(0) if direction == "x": nx = lambda n: 2**n ny = lambda n: 2 u = Constant((1, 0)) exact_expr = lambda x: sin(2*pi*(x[0] - t)) elif direction == "y": nx = lambda n: 2 ny = lambda n: 2**n u = Constant((0, 1)) exact_expr = lambda x: sin(2*pi*(x[1] - t)) # Advect a sine wave with a constant, unit velocity for 200 # timesteps (dt = 5e-5) for n in range(7, 11): mesh = PeriodicRectangleMesh(nx(n), ny(n), 1, 1, direction=direction, quadrilateral=quadrilateral) x = SpatialCoordinate(mesh) V = FunctionSpace(mesh, "DG", degree) D = TrialFunction(V) phi = TestFunction(V) n = FacetNormal(mesh) un = 0.5 * (dot(u, n) + abs(dot(u, n))) a_mass = phi*D*dx a_int = dot(grad(phi), -u*D)*dx a_flux = dot(jump(phi), jump(un*D))*dS dD1 = Function(V) D1 = Function(V) t.assign(0) exact = exact_expr(x) D = Function(V).interpolate(exact) nstep = 200 dt = Constant(5e-5) arhs = action(a_mass - dt * (a_int + a_flux), D1) rhs = Function(V) # Since DG mass-matrix is block diagonal, just assemble the # inverse and then "solve" is a matvec. mass_inv = assemble(a_mass, inverse=True) > mass_inv.force_evaluation() tests/regression/test_periodic_rectangle_advection.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________ test_periodic_rectangle_advection[DG0-x-triangle] _______________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: par_loop_kernel -------...s'), Map(Set((512, 512, 512), 'Cells'), Set((384, 384, 384), 'set_10020'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3db8fa0840> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('630fd9152ed1cf23415fcfebd81ecabe', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('630fd9152ed1cf23415fcfebd81ecabe', , False, False, False, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('WRITE'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/9a/770d862b63bea0e811c76ca9b17e1e.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/9a/770d862b63bea0e811c76ca9b17e1e.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 0, threshold = 0.98, direction = 'x', quadrilateral = False def test_periodic_rectangle_advection(degree, threshold, direction, quadrilateral): l2error = [] t = Constant(0) if direction == "x": nx = lambda n: 2**n ny = lambda n: 2 u = Constant((1, 0)) exact_expr = lambda x: sin(2*pi*(x[0] - t)) elif direction == "y": nx = lambda n: 2 ny = lambda n: 2**n u = Constant((0, 1)) exact_expr = lambda x: sin(2*pi*(x[1] - t)) # Advect a sine wave with a constant, unit velocity for 200 # timesteps (dt = 5e-5) for n in range(7, 11): mesh = PeriodicRectangleMesh(nx(n), ny(n), 1, 1, direction=direction, quadrilateral=quadrilateral) x = SpatialCoordinate(mesh) V = FunctionSpace(mesh, "DG", degree) D = TrialFunction(V) phi = TestFunction(V) n = FacetNormal(mesh) un = 0.5 * (dot(u, n) + abs(dot(u, n))) a_mass = phi*D*dx a_int = dot(grad(phi), -u*D)*dx a_flux = dot(jump(phi), jump(un*D))*dS dD1 = Function(V) D1 = Function(V) t.assign(0) exact = exact_expr(x) D = Function(V).interpolate(exact) nstep = 200 dt = Constant(5e-5) arhs = action(a_mass - dt * (a_int + a_flux), D1) rhs = Function(V) # Since DG mass-matrix is block diagonal, just assemble the # inverse and then "solve" is a matvec. mass_inv = assemble(a_mass, inverse=True) > mass_inv.force_evaluation() tests/regression/test_periodic_rectangle_advection.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________ test_periodic_rectangle_advection[DG0-y-quad] _________________________________________________ cls = args = (Kernel(""" static inline void form00_cell_integral_otherwise (double A[1][1] , const double *restrict coords ) { ..., Map(Set((256, 256, 256), 'Cells'), Set((1024, 1024, 1024), 'set_10029'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3e12e2bd08> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('fea5231051ad42301505ae99d997cb91', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('fea5231051ad42301505ae99d997cb91', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 1, None), (, 1, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/37/ab8d14b3ddb084dabb0b006a8a7b8f.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/37/ab8d14b3ddb084dabb0b006a8a7b8f.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 0, threshold = 0.98, direction = 'y', quadrilateral = True def test_periodic_rectangle_advection(degree, threshold, direction, quadrilateral): l2error = [] t = Constant(0) if direction == "x": nx = lambda n: 2**n ny = lambda n: 2 u = Constant((1, 0)) exact_expr = lambda x: sin(2*pi*(x[0] - t)) elif direction == "y": nx = lambda n: 2 ny = lambda n: 2**n u = Constant((0, 1)) exact_expr = lambda x: sin(2*pi*(x[1] - t)) # Advect a sine wave with a constant, unit velocity for 200 # timesteps (dt = 5e-5) for n in range(7, 11): mesh = PeriodicRectangleMesh(nx(n), ny(n), 1, 1, direction=direction, quadrilateral=quadrilateral) x = SpatialCoordinate(mesh) V = FunctionSpace(mesh, "DG", degree) D = TrialFunction(V) phi = TestFunction(V) n = FacetNormal(mesh) un = 0.5 * (dot(u, n) + abs(dot(u, n))) a_mass = phi*D*dx a_int = dot(grad(phi), -u*D)*dx a_flux = dot(jump(phi), jump(un*D))*dS dD1 = Function(V) D1 = Function(V) t.assign(0) exact = exact_expr(x) D = Function(V).interpolate(exact) nstep = 200 dt = Constant(5e-5) arhs = action(a_mass - dt * (a_int + a_flux), D1) rhs = Function(V) # Since DG mass-matrix is block diagonal, just assemble the # inverse and then "solve" is a matvec. mass_inv = assemble(a_mass, inverse=True) > mass_inv.force_evaluation() tests/regression/test_periodic_rectangle_advection.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________ test_periodic_rectangle_advection[DG0-y-triangle] _______________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: par_loop_kernel -------...s'), Map(Set((512, 512, 512), 'Cells'), Set((384, 384, 384), 'set_10032'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d681ebe18> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('630fd9152ed1cf23415fcfebd81ecabe', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('630fd9152ed1cf23415fcfebd81ecabe', , False, False, False, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('WRITE'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/9a/770d862b63bea0e811c76ca9b17e1e.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/9a/770d862b63bea0e811c76ca9b17e1e.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 0, threshold = 0.98, direction = 'y', quadrilateral = False def test_periodic_rectangle_advection(degree, threshold, direction, quadrilateral): l2error = [] t = Constant(0) if direction == "x": nx = lambda n: 2**n ny = lambda n: 2 u = Constant((1, 0)) exact_expr = lambda x: sin(2*pi*(x[0] - t)) elif direction == "y": nx = lambda n: 2 ny = lambda n: 2**n u = Constant((0, 1)) exact_expr = lambda x: sin(2*pi*(x[1] - t)) # Advect a sine wave with a constant, unit velocity for 200 # timesteps (dt = 5e-5) for n in range(7, 11): mesh = PeriodicRectangleMesh(nx(n), ny(n), 1, 1, direction=direction, > quadrilateral=quadrilateral) tests/regression/test_periodic_rectangle_advection.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/utility_meshes.py:498: in PeriodicRectangleMesh comm=comm) firedrake/utility_meshes.py:1395: in PartiallyPeriodicRectangleMesh new_coordinates.dat.data[:] = np.dot(new_coordinates.dat.data, operator.T) ../PyOP2/pyop2/base.py:1623: in data _trace.evaluate(set([self]), set([self])) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________ test_periodic_rectangle_advection[DG1-x-quad] _________________________________________________ cls = args = (Kernel(""" static inline void form00_cell_integral_otherwise (double A[4][4] , const double *restrict coords ) { ..., Map(Set((256, 256, 256), 'Cells'), Set((1024, 1024, 1024), 'set_10040'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d9c44da60> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('115f2d01a31358ef8b10b509d132c529', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('115f2d01a31358ef8b10b509d132c529', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 4, None), (, 4, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/50/100bddf4be5ddaca448a133771ce30.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/50/100bddf4be5ddaca448a133771ce30.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 1, threshold = 1.8, direction = 'x', quadrilateral = True def test_periodic_rectangle_advection(degree, threshold, direction, quadrilateral): l2error = [] t = Constant(0) if direction == "x": nx = lambda n: 2**n ny = lambda n: 2 u = Constant((1, 0)) exact_expr = lambda x: sin(2*pi*(x[0] - t)) elif direction == "y": nx = lambda n: 2 ny = lambda n: 2**n u = Constant((0, 1)) exact_expr = lambda x: sin(2*pi*(x[1] - t)) # Advect a sine wave with a constant, unit velocity for 200 # timesteps (dt = 5e-5) for n in range(7, 11): mesh = PeriodicRectangleMesh(nx(n), ny(n), 1, 1, direction=direction, quadrilateral=quadrilateral) x = SpatialCoordinate(mesh) V = FunctionSpace(mesh, "DG", degree) D = TrialFunction(V) phi = TestFunction(V) n = FacetNormal(mesh) un = 0.5 * (dot(u, n) + abs(dot(u, n))) a_mass = phi*D*dx a_int = dot(grad(phi), -u*D)*dx a_flux = dot(jump(phi), jump(un*D))*dS dD1 = Function(V) D1 = Function(V) t.assign(0) exact = exact_expr(x) D = Function(V).interpolate(exact) nstep = 200 dt = Constant(5e-5) arhs = action(a_mass - dt * (a_int + a_flux), D1) rhs = Function(V) # Since DG mass-matrix is block diagonal, just assemble the # inverse and then "solve" is a matvec. mass_inv = assemble(a_mass, inverse=True) > mass_inv.force_evaluation() tests/regression/test_periodic_rectangle_advection.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________ test_periodic_rectangle_advection[DG1-x-triangle] _______________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: par_loop_kernel -------...s'), Map(Set((512, 512, 512), 'Cells'), Set((384, 384, 384), 'set_10042'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d9c47c488> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('630fd9152ed1cf23415fcfebd81ecabe', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('630fd9152ed1cf23415fcfebd81ecabe', , False, False, False, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('WRITE'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/9a/770d862b63bea0e811c76ca9b17e1e.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/9a/770d862b63bea0e811c76ca9b17e1e.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 1, threshold = 1.8, direction = 'x', quadrilateral = False def test_periodic_rectangle_advection(degree, threshold, direction, quadrilateral): l2error = [] t = Constant(0) if direction == "x": nx = lambda n: 2**n ny = lambda n: 2 u = Constant((1, 0)) exact_expr = lambda x: sin(2*pi*(x[0] - t)) elif direction == "y": nx = lambda n: 2 ny = lambda n: 2**n u = Constant((0, 1)) exact_expr = lambda x: sin(2*pi*(x[1] - t)) # Advect a sine wave with a constant, unit velocity for 200 # timesteps (dt = 5e-5) for n in range(7, 11): mesh = PeriodicRectangleMesh(nx(n), ny(n), 1, 1, direction=direction, quadrilateral=quadrilateral) x = SpatialCoordinate(mesh) V = FunctionSpace(mesh, "DG", degree) D = TrialFunction(V) phi = TestFunction(V) n = FacetNormal(mesh) un = 0.5 * (dot(u, n) + abs(dot(u, n))) a_mass = phi*D*dx a_int = dot(grad(phi), -u*D)*dx a_flux = dot(jump(phi), jump(un*D))*dS dD1 = Function(V) D1 = Function(V) t.assign(0) exact = exact_expr(x) D = Function(V).interpolate(exact) nstep = 200 dt = Constant(5e-5) arhs = action(a_mass - dt * (a_int + a_flux), D1) rhs = Function(V) # Since DG mass-matrix is block diagonal, just assemble the # inverse and then "solve" is a matvec. mass_inv = assemble(a_mass, inverse=True) > mass_inv.force_evaluation() tests/regression/test_periodic_rectangle_advection.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________ test_periodic_rectangle_advection[DG1-y-quad] _________________________________________________ cls = args = (Kernel(""" static inline void form00_cell_integral_otherwise (double A[4][4] , const double *restrict coords ) { ..., Map(Set((256, 256, 256), 'Cells'), Set((1024, 1024, 1024), 'set_10050'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3db9aab048> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('115f2d01a31358ef8b10b509d132c529', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('115f2d01a31358ef8b10b509d132c529', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 4, None), (, 4, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/50/100bddf4be5ddaca448a133771ce30.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/50/100bddf4be5ddaca448a133771ce30.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 1, threshold = 1.8, direction = 'y', quadrilateral = True def test_periodic_rectangle_advection(degree, threshold, direction, quadrilateral): l2error = [] t = Constant(0) if direction == "x": nx = lambda n: 2**n ny = lambda n: 2 u = Constant((1, 0)) exact_expr = lambda x: sin(2*pi*(x[0] - t)) elif direction == "y": nx = lambda n: 2 ny = lambda n: 2**n u = Constant((0, 1)) exact_expr = lambda x: sin(2*pi*(x[1] - t)) # Advect a sine wave with a constant, unit velocity for 200 # timesteps (dt = 5e-5) for n in range(7, 11): mesh = PeriodicRectangleMesh(nx(n), ny(n), 1, 1, direction=direction, quadrilateral=quadrilateral) x = SpatialCoordinate(mesh) V = FunctionSpace(mesh, "DG", degree) D = TrialFunction(V) phi = TestFunction(V) n = FacetNormal(mesh) un = 0.5 * (dot(u, n) + abs(dot(u, n))) a_mass = phi*D*dx a_int = dot(grad(phi), -u*D)*dx a_flux = dot(jump(phi), jump(un*D))*dS dD1 = Function(V) D1 = Function(V) t.assign(0) exact = exact_expr(x) D = Function(V).interpolate(exact) nstep = 200 dt = Constant(5e-5) arhs = action(a_mass - dt * (a_int + a_flux), D1) rhs = Function(V) # Since DG mass-matrix is block diagonal, just assemble the # inverse and then "solve" is a matvec. mass_inv = assemble(a_mass, inverse=True) > mass_inv.force_evaluation() tests/regression/test_periodic_rectangle_advection.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________ test_periodic_rectangle_advection[DG1-y-triangle] _______________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: par_loop_kernel -------...s'), Map(Set((512, 512, 512), 'Cells'), Set((384, 384, 384), 'set_10052'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d62dceb70> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('630fd9152ed1cf23415fcfebd81ecabe', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('630fd9152ed1cf23415fcfebd81ecabe', , False, False, False, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('WRITE'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/9a/770d862b63bea0e811c76ca9b17e1e.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/9a/770d862b63bea0e811c76ca9b17e1e.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 1, threshold = 1.8, direction = 'y', quadrilateral = False def test_periodic_rectangle_advection(degree, threshold, direction, quadrilateral): l2error = [] t = Constant(0) if direction == "x": nx = lambda n: 2**n ny = lambda n: 2 u = Constant((1, 0)) exact_expr = lambda x: sin(2*pi*(x[0] - t)) elif direction == "y": nx = lambda n: 2 ny = lambda n: 2**n u = Constant((0, 1)) exact_expr = lambda x: sin(2*pi*(x[1] - t)) # Advect a sine wave with a constant, unit velocity for 200 # timesteps (dt = 5e-5) for n in range(7, 11): mesh = PeriodicRectangleMesh(nx(n), ny(n), 1, 1, direction=direction, > quadrilateral=quadrilateral) tests/regression/test_periodic_rectangle_advection.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/utility_meshes.py:498: in PeriodicRectangleMesh comm=comm) firedrake/utility_meshes.py:1395: in PartiallyPeriodicRectangleMesh new_coordinates.dat.data[:] = np.dot(new_coordinates.dat.data, operator.T) ../PyOP2/pyop2/base.py:1623: in data _trace.evaluate(set([self]), set([self])) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________ test_periodic_rectangle_advection[DG2-x-quad] _________________________________________________ cls = args = (Kernel(""" static inline void form00_cell_integral_otherwise (double A[9][9] , const double *restrict coords ) { ..., Map(Set((256, 256, 256), 'Cells'), Set((1024, 1024, 1024), 'set_10060'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d514f4a60> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('2fecf6dc8221cf9bad9834a68fdd2272', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('2fecf6dc8221cf9bad9834a68fdd2272', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 9, None), (, 9, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/63/fd769f56b056ff06675e8ebe8a9af8.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/63/fd769f56b056ff06675e8ebe8a9af8.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 2, threshold = 2.9, direction = 'x', quadrilateral = True def test_periodic_rectangle_advection(degree, threshold, direction, quadrilateral): l2error = [] t = Constant(0) if direction == "x": nx = lambda n: 2**n ny = lambda n: 2 u = Constant((1, 0)) exact_expr = lambda x: sin(2*pi*(x[0] - t)) elif direction == "y": nx = lambda n: 2 ny = lambda n: 2**n u = Constant((0, 1)) exact_expr = lambda x: sin(2*pi*(x[1] - t)) # Advect a sine wave with a constant, unit velocity for 200 # timesteps (dt = 5e-5) for n in range(7, 11): mesh = PeriodicRectangleMesh(nx(n), ny(n), 1, 1, direction=direction, quadrilateral=quadrilateral) x = SpatialCoordinate(mesh) V = FunctionSpace(mesh, "DG", degree) D = TrialFunction(V) phi = TestFunction(V) n = FacetNormal(mesh) un = 0.5 * (dot(u, n) + abs(dot(u, n))) a_mass = phi*D*dx a_int = dot(grad(phi), -u*D)*dx a_flux = dot(jump(phi), jump(un*D))*dS dD1 = Function(V) D1 = Function(V) t.assign(0) exact = exact_expr(x) D = Function(V).interpolate(exact) nstep = 200 dt = Constant(5e-5) arhs = action(a_mass - dt * (a_int + a_flux), D1) rhs = Function(V) # Since DG mass-matrix is block diagonal, just assemble the # inverse and then "solve" is a matvec. mass_inv = assemble(a_mass, inverse=True) > mass_inv.force_evaluation() tests/regression/test_periodic_rectangle_advection.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________ test_periodic_rectangle_advection[DG2-x-triangle] _______________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: par_loop_kernel -------...s'), Map(Set((512, 512, 512), 'Cells'), Set((384, 384, 384), 'set_10063'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d514f4400> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('630fd9152ed1cf23415fcfebd81ecabe', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('630fd9152ed1cf23415fcfebd81ecabe', , False, False, False, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('WRITE'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/9a/770d862b63bea0e811c76ca9b17e1e.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/9a/770d862b63bea0e811c76ca9b17e1e.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 2, threshold = 2.9, direction = 'x', quadrilateral = False def test_periodic_rectangle_advection(degree, threshold, direction, quadrilateral): l2error = [] t = Constant(0) if direction == "x": nx = lambda n: 2**n ny = lambda n: 2 u = Constant((1, 0)) exact_expr = lambda x: sin(2*pi*(x[0] - t)) elif direction == "y": nx = lambda n: 2 ny = lambda n: 2**n u = Constant((0, 1)) exact_expr = lambda x: sin(2*pi*(x[1] - t)) # Advect a sine wave with a constant, unit velocity for 200 # timesteps (dt = 5e-5) for n in range(7, 11): mesh = PeriodicRectangleMesh(nx(n), ny(n), 1, 1, direction=direction, quadrilateral=quadrilateral) x = SpatialCoordinate(mesh) V = FunctionSpace(mesh, "DG", degree) D = TrialFunction(V) phi = TestFunction(V) n = FacetNormal(mesh) un = 0.5 * (dot(u, n) + abs(dot(u, n))) a_mass = phi*D*dx a_int = dot(grad(phi), -u*D)*dx a_flux = dot(jump(phi), jump(un*D))*dS dD1 = Function(V) D1 = Function(V) t.assign(0) exact = exact_expr(x) D = Function(V).interpolate(exact) nstep = 200 dt = Constant(5e-5) arhs = action(a_mass - dt * (a_int + a_flux), D1) rhs = Function(V) # Since DG mass-matrix is block diagonal, just assemble the # inverse and then "solve" is a matvec. mass_inv = assemble(a_mass, inverse=True) > mass_inv.force_evaluation() tests/regression/test_periodic_rectangle_advection.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________ test_periodic_rectangle_advection[DG2-y-quad] _________________________________________________ cls = args = (Kernel(""" static inline void form00_cell_integral_otherwise (double A[9][9] , const double *restrict coords ) { ..., Map(Set((256, 256, 256), 'Cells'), Set((1024, 1024, 1024), 'set_10072'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3e018286a8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('2fecf6dc8221cf9bad9834a68fdd2272', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('2fecf6dc8221cf9bad9834a68fdd2272', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 9, None), (, 9, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/63/fd769f56b056ff06675e8ebe8a9af8.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/63/fd769f56b056ff06675e8ebe8a9af8.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 2, threshold = 2.9, direction = 'y', quadrilateral = True def test_periodic_rectangle_advection(degree, threshold, direction, quadrilateral): l2error = [] t = Constant(0) if direction == "x": nx = lambda n: 2**n ny = lambda n: 2 u = Constant((1, 0)) exact_expr = lambda x: sin(2*pi*(x[0] - t)) elif direction == "y": nx = lambda n: 2 ny = lambda n: 2**n u = Constant((0, 1)) exact_expr = lambda x: sin(2*pi*(x[1] - t)) # Advect a sine wave with a constant, unit velocity for 200 # timesteps (dt = 5e-5) for n in range(7, 11): mesh = PeriodicRectangleMesh(nx(n), ny(n), 1, 1, direction=direction, quadrilateral=quadrilateral) x = SpatialCoordinate(mesh) V = FunctionSpace(mesh, "DG", degree) D = TrialFunction(V) phi = TestFunction(V) n = FacetNormal(mesh) un = 0.5 * (dot(u, n) + abs(dot(u, n))) a_mass = phi*D*dx a_int = dot(grad(phi), -u*D)*dx a_flux = dot(jump(phi), jump(un*D))*dS dD1 = Function(V) D1 = Function(V) t.assign(0) exact = exact_expr(x) D = Function(V).interpolate(exact) nstep = 200 dt = Constant(5e-5) arhs = action(a_mass - dt * (a_int + a_flux), D1) rhs = Function(V) # Since DG mass-matrix is block diagonal, just assemble the # inverse and then "solve" is a matvec. mass_inv = assemble(a_mass, inverse=True) > mass_inv.force_evaluation() tests/regression/test_periodic_rectangle_advection.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________ test_periodic_rectangle_advection[DG2-y-triangle] _______________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: par_loop_kernel -------...s'), Map(Set((512, 512, 512), 'Cells'), Set((384, 384, 384), 'set_10075'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d60f0cd90> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('630fd9152ed1cf23415fcfebd81ecabe', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('630fd9152ed1cf23415fcfebd81ecabe', , False, False, False, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('WRITE'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/9a/770d862b63bea0e811c76ca9b17e1e.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/9a/770d862b63bea0e811c76ca9b17e1e.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 2, threshold = 2.9, direction = 'y', quadrilateral = False def test_periodic_rectangle_advection(degree, threshold, direction, quadrilateral): l2error = [] t = Constant(0) if direction == "x": nx = lambda n: 2**n ny = lambda n: 2 u = Constant((1, 0)) exact_expr = lambda x: sin(2*pi*(x[0] - t)) elif direction == "y": nx = lambda n: 2 ny = lambda n: 2**n u = Constant((0, 1)) exact_expr = lambda x: sin(2*pi*(x[1] - t)) # Advect a sine wave with a constant, unit velocity for 200 # timesteps (dt = 5e-5) for n in range(7, 11): mesh = PeriodicRectangleMesh(nx(n), ny(n), 1, 1, direction=direction, > quadrilateral=quadrilateral) tests/regression/test_periodic_rectangle_advection.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/utility_meshes.py:498: in PeriodicRectangleMesh comm=comm) firedrake/utility_meshes.py:1395: in PartiallyPeriodicRectangleMesh new_coordinates.dat.data[:] = np.dot(new_coordinates.dat.data, operator.T) ../PyOP2/pyop2/base.py:1623: in data _trace.evaluate(set([self]), set([self])) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________ test_parallel_periodic_rectangle_advection ___________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________________________ test_project __________________________________________________________________ def test_project(): mesh = UnitSquareMesh(5, 5) U = FunctionSpace(mesh, "RT", 1) V = FunctionSpace(mesh, "N1curl", 1) W = U*V f = Function(W) f.assign(1) out = Function(W) u1, u2 = TrialFunctions(W) v1, v2 = TestFunctions(W) f1, f2 = split(f) a = dot(u1, v1)*dx + dot(u2, v2)*dx L = dot(f1, v1)*dx + dot(f2, v2)*dx solve(a == L, out) > assert np.allclose(out.dat.data[0], f.dat.data[0], rtol=1e-5) E assert False E + where False = (array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n 0., 0., 0., 0., 0., 0., 0., 0., 0., ...0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]), array([1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,\n 1., 1., 1., 1., 1., 1., 1., 1., 1., ...1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,\n 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]), rtol=1e-05) E + where = np.allclose tests/regression/test_piola_mixed_fn.py:23: AssertionError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('c839356dc04279b75d2e29bc432ff754', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/99/c251fc2405155b8a3661ed93ac4e18.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 412, in vecscatter with d.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('c2cb9f34b00f8fbbd889ea1254f4e91a', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/85/7c7bc4b403f0dccde5861cced89edd.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 289, in form_jacobian X.copy(v) File "/usr/lib/python3.6/contextlib.py", line 88, in __exit__ next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 419, in vecscatter with d.vec_wo as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ______________________________________________________________ test_sphere_project ______________________________________________________________ def test_sphere_project(): mesh = UnitIcosahedralSphereMesh(0) x = SpatialCoordinate(mesh) mesh.init_cell_orientations(x) U1 = FunctionSpace(mesh, "RT", 1) U2 = FunctionSpace(mesh, "CG", 2) U3 = FunctionSpace(mesh, "N1curl", 1) W = U1*U2*U3 f = Function(W) f1, f2, f3 = f.split() f1.assign(1) f2.assign(2) f3.assign(3) out = Function(W) u1, u2, u3 = TrialFunctions(W) v1, v2, v3 = TestFunctions(W) f1, f2, f3 = split(f) a = dot(u1, v1)*dx + dot(u2, v2)*dx + dot(u3, v3)*dx L = dot(f1, v1)*dx + dot(f2, v2)*dx + dot(f3, v3)*dx solve(a == L, out) > assert np.allclose(out.dat.data[0], f.dat.data[0], rtol=1e-5) E assert False E + where False = (array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]), array([1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,\n 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]), rtol=1e-05) E + where = np.allclose tests/regression/test_piola_mixed_fn.py:51: AssertionError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('7035c230ca5432438e09dd7a94e8bf2f', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 3, None),), False, 1, , Access('READ'), (, dtype('int32'), (, (1,), (,))), ((, 1, None),), False, 2, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 3, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 3, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/df/69d61f089d31d1f85d0061dcc0ff48.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 412, in vecscatter with d.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('503697437be3d6006f1f4b66e8cea7cc', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 3, None),), False, 1, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 2, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 2, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 2, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 2, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/d8/895332596fb5d192c24c1283af6c40.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 289, in form_jacobian X.copy(v) File "/usr/lib/python3.6/contextlib.py", line 88, in __exit__ next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 419, in vecscatter with d.vec_wo as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________________________________ test_1d_args __________________________________________________________________ self = Coefficient(WithGeometry(FunctionSpace(, VectorElement(FiniteEle...', interval, 1), dim=1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 32821)), 48341) tolerance = None def _c_evaluate(self, tolerance=None): cache = self.__dict__.setdefault("_c_evaluate_cache", {}) try: > return cache[tolerance] E KeyError: None firedrake/function.py:487: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = .StrCode object at 0x7f3cc428ee80> extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/6e/1a830fedf4dafad0592615d6dee59f.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/6e/1a830fedf4dafad0592615d6dee59f.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: def test_1d_args(): mesh = UnitIntervalMesh(1) f = mesh.coordinates # one point > assert np.allclose(0.2, f.at(0.2)) tests/regression/test_point_eval_api.py:15: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:573: in at single_eval(points[i:i+1], p_result) firedrake/function.py:551: in single_eval err = self._c_evaluate(tolerance=tolerance)(self._ctypes, firedrake/function.py:489: in _c_evaluate result = make_c_evaluate(self, tolerance=tolerance) firedrake/function.py:664: in make_c_evaluate comm=function.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________________________ test_2d_args __________________________________________________________________ self = Coefficient(WithGeometry(FunctionSpace(, VectorElement(FiniteEle...', triangle, 1), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32824)), 48347) tolerance = None def _c_evaluate(self, tolerance=None): cache = self.__dict__.setdefault("_c_evaluate_cache", {}) try: > return cache[tolerance] E KeyError: None firedrake/function.py:487: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = .StrCode object at 0x7f3ccbe05f98> extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/58/6b9cc1fb0d3be9d516e643dbfadaaf.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/58/6b9cc1fb0d3be9d516e643dbfadaaf.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: def test_2d_args(): mesh = UnitSquareMesh(1, 1) f = mesh.coordinates # one point > assert np.allclose([0.2, 0.4], f.at(0.2, 0.4)) tests/regression/test_point_eval_api.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:573: in at single_eval(points[i:i+1], p_result) firedrake/function.py:551: in single_eval err = self._c_evaluate(tolerance=tolerance)(self._ctypes, firedrake/function.py:489: in _c_evaluate result = make_c_evaluate(self, tolerance=tolerance) firedrake/function.py:664: in make_c_evaluate comm=function.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________________ test_dont_raise ________________________________________________________________ self = Coefficient(WithGeometry(FunctionSpace(, FiniteElement('Lagrange', interval, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 32827)), 48354) tolerance = None def _c_evaluate(self, tolerance=None): cache = self.__dict__.setdefault("_c_evaluate_cache", {}) try: > return cache[tolerance] E KeyError: None firedrake/function.py:487: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = .StrCode object at 0x7f3cc3d9a828> extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/a9/ddaea0da6b3b795794120c6d292221.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/a9/ddaea0da6b3b795794120c6d292221.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: def test_dont_raise(): mesh = UnitIntervalMesh(1) V = FunctionSpace(mesh, "CG", 1) x = SpatialCoordinate(mesh) f = Function(V).interpolate(2.0 * x[0]) # raise exception without dont_raise with pytest.raises(PointNotInDomainError): > f.at(-1) tests/regression/test_point_eval_api.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:573: in at single_eval(points[i:i+1], p_result) firedrake/function.py:551: in single_eval err = self._c_evaluate(tolerance=tolerance)(self._ctypes, firedrake/function.py:489: in _c_evaluate result = make_c_evaluate(self, tolerance=tolerance) firedrake/function.py:664: in make_c_evaluate comm=function.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________________ test_dont_raise_vector _____________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((2, 2, 2), 'set_10104'), 2, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d5de3f158> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('b781d6a9ea22e31244bd5578490c3725', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('b781d6a9ea22e31244bd5578490c3725', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (2,), (,))), ((, 2, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/9c/fe5b1f7a04f9434fe482e02cb61d88.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/9c/fe5b1f7a04f9434fe482e02cb61d88.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: def test_dont_raise_vector(): mesh = UnitIntervalMesh(1) V = VectorFunctionSpace(mesh, "CG", 1, dim=2) x = SpatialCoordinate(mesh) f = Function(V).interpolate(as_vector((x[0], 2.0 * x[0]))) # raise exception without dont_raise with pytest.raises(PointNotInDomainError): > f.at(-1) tests/regression/test_point_eval_api.py:105: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:509: in at self.dat._force_evaluation(read=True, write=False) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________________________ test_dont_raise_mixed _____________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth... 'Coordinates'), Map(Set((2, 2, 2), 'Cells'), Set((4, 4, 4), 'set_10108'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d684d09d8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('9ca338067996507d2fffa827bf681955', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('9ca338067996507d2fffa827bf681955', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 8, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/98/9d175ed45107baa119037abfbf34be.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/98/9d175ed45107baa119037abfbf34be.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: def test_dont_raise_mixed(): mesh = UnitSquareMesh(1, 1) V1 = FunctionSpace(mesh, "DG", 1) V2 = FunctionSpace(mesh, "RT", 2) V = V1 * V2 f = Function(V) f1, f2 = f.split() x = SpatialCoordinate(mesh) f1.interpolate(x[0] + 1.2*x[1]) > f2.project(as_vector((x[1], 0.8 + x[0]))) tests/regression/test_point_eval_api.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/linear_solver.py:157: in solve with self.inserted_options(), b.dat.vec_ro as rhs, acc as solution: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________________ test_nascent_parallel_support _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________________ test_1d[False] _________________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...dinates'), Map(Set((16, 16, 16), 'Cells'), Set((17, 17, 17), 'set_10114'), 2, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d99a9af28> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('8ee0f765bed673c9f8361f1305599d22', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('8ee0f765bed673c9f8361f1305599d22', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/49/be5472e14641100a851ac2f609b4d8.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/49/be5472e14641100a851ac2f609b4d8.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: func1d = Coefficient(WithGeometry(FunctionSpace(, FiniteElement('Lagrange', interval, 2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 32842)), 48381) def test_1d(func1d): expr = lambda x: x*(1 - x) > assert np.allclose(expr(0.1), func1d([0.1])) tests/regression/test_point_eval_cells.py:80: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ufl/ufl/exproperators.py:341: in _call return _eval(self, arg, mapping, component) ../ufl/ufl/exproperators.py:331: in _eval return f.evaluate(coord, mapping, component, index_values) firedrake/function.py:498: in evaluate return self.at(coord) firedrake/function.py:509: in at self.dat._force_evaluation(read=True, write=False) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________________________ test_1d[True] _________________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...n_32847'), Map(Set((16, 16, 16), 'Cells'), Set((32, 32, 32), 'set_10122'), 2, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d97552840> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('8ee0f765bed673c9f8361f1305599d22', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('8ee0f765bed673c9f8361f1305599d22', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/49/be5472e14641100a851ac2f609b4d8.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/49/be5472e14641100a851ac2f609b4d8.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: func1d = Coefficient(WithGeometry(FunctionSpace(, FiniteElement('Lagrange...erval, 2), name=None), Mesh(VectorElement(FiniteElement('Discontinuous Lagrange', interval, 1), dim=1), 32848)), 48390) def test_1d(func1d): expr = lambda x: x*(1 - x) > assert np.allclose(expr(0.1), func1d([0.1])) tests/regression/test_point_eval_cells.py:80: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ufl/ufl/exproperators.py:341: in _call return _eval(self, arg, mapping, component) ../ufl/ufl/exproperators.py:331: in _eval return f.evaluate(coord, mapping, component, index_values) firedrake/function.py:498: in evaluate return self.at(coord) firedrake/function.py:509: in at self.dat._force_evaluation(read=True, write=False) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________________ test_2d[mesh2d0] ________________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...s'), Map(Set((288, 288, 288), 'Cells'), Set((169, 169, 169), 'set_10125'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d68450730> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('4feae222067db94b06e154c532d36295', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('4feae222067db94b06e154c532d36295', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/e3/a2ecdbb49084b218e4dbc9fa3bb21d.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/e3/a2ecdbb49084b218e4dbc9fa3bb21d.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: func2d = Coefficient(WithGeometry(FunctionSpace(, FiniteElement('Lagrange', triangle, 2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32850)), 48395) def test_2d(func2d): expr = lambda x, y: cos(pi*(y - 0.5))*sin(pi*x) > assert np.allclose(expr(0.10, 0.20), func2d([0.10, 0.20]), rtol=1e-2) tests/regression/test_point_eval_cells.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ufl/ufl/exproperators.py:341: in _call return _eval(self, arg, mapping, component) ../ufl/ufl/exproperators.py:331: in _eval return f.evaluate(coord, mapping, component, index_values) firedrake/function.py:498: in evaluate return self.at(coord) firedrake/function.py:509: in at self.dat._force_evaluation(read=True, write=False) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________________ test_2d[mesh2d1] ________________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...s'), Map(Set((144, 144, 144), 'Cells'), Set((169, 169, 169), 'set_10130'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d60eae6a8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('3d4c5a4c67b249b4d98453d6dbad0974', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('3d4c5a4c67b249b4d98453d6dbad0974', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 9, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/07/21f40a06b47094cfe7f43a1d8c411f.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/07/21f40a06b47094cfe7f43a1d8c411f.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: func2d = Coefficient(WithGeometry(FunctionSpace(, FiniteElement('Q', quadrilateral, 2), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 32853)), 48400) def test_2d(func2d): expr = lambda x, y: cos(pi*(y - 0.5))*sin(pi*x) > assert np.allclose(expr(0.10, 0.20), func2d([0.10, 0.20]), rtol=1e-2) tests/regression/test_point_eval_cells.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ufl/ufl/exproperators.py:341: in _call return _eval(self, arg, mapping, component) ../ufl/ufl/exproperators.py:331: in _eval return f.evaluate(coord, mapping, component, index_values) firedrake/function.py:498: in evaluate return self.at(coord) firedrake/function.py:509: in at self.dat._force_evaluation(read=True, write=False) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________________ test_2d[mesh2d2] ________________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...8'), Map(Set((288, 288, 288), 'Cells'), Set((864, 864, 864), 'set_10138'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d99a9a8c8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('4feae222067db94b06e154c532d36295', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('4feae222067db94b06e154c532d36295', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/e3/a2ecdbb49084b218e4dbc9fa3bb21d.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/e3/a2ecdbb49084b218e4dbc9fa3bb21d.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: func2d = Coefficient(WithGeometry(FunctionSpace(, FiniteElement('Lagrange...angle, 2), name=None), Mesh(VectorElement(FiniteElement('Discontinuous Lagrange', triangle, 1), dim=2), 32859)), 48410) def test_2d(func2d): expr = lambda x, y: cos(pi*(y - 0.5))*sin(pi*x) > assert np.allclose(expr(0.10, 0.20), func2d([0.10, 0.20]), rtol=1e-2) tests/regression/test_point_eval_cells.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ufl/ufl/exproperators.py:341: in _call return _eval(self, arg, mapping, component) ../ufl/ufl/exproperators.py:331: in _eval return f.evaluate(coord, mapping, component, index_values) firedrake/function.py:498: in evaluate return self.at(coord) firedrake/function.py:509: in at self.dat._force_evaluation(read=True, write=False) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________________ test_2d[mesh2d3] ________________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...3'), Map(Set((144, 144, 144), 'Cells'), Set((576, 576, 576), 'set_10144'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3dc765af28> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('3d4c5a4c67b249b4d98453d6dbad0974', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('3d4c5a4c67b249b4d98453d6dbad0974', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 9, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/07/21f40a06b47094cfe7f43a1d8c411f.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/07/21f40a06b47094cfe7f43a1d8c411f.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: func2d = Coefficient(WithGeometry(FunctionSpace(, FiniteElement('Q', quadrilateral, 2), name=None), Mesh(VectorElement(FiniteElement('DQ', quadrilateral, 1), dim=2), 32864)), 48420) def test_2d(func2d): expr = lambda x, y: cos(pi*(y - 0.5))*sin(pi*x) > assert np.allclose(expr(0.10, 0.20), func2d([0.10, 0.20]), rtol=1e-2) tests/regression/test_point_eval_cells.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ufl/ufl/exproperators.py:341: in _call return _eval(self, arg, mapping, component) ../ufl/ufl/exproperators.py:331: in _eval return f.evaluate(coord, mapping, component, index_values) firedrake/function.py:498: in evaluate return self.at(coord) firedrake/function.py:509: in at self.dat._force_evaluation(read=True, write=False) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________________ test_2d[mesh2d4] ________________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----..., Map(Set((1321, 1321, 1321), 'Cells'), Set((682, 682, 682), 'set_10147'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d60eae598> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('4feae222067db94b06e154c532d36295', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('4feae222067db94b06e154c532d36295', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/e3/a2ecdbb49084b218e4dbc9fa3bb21d.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/e3/a2ecdbb49084b218e4dbc9fa3bb21d.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: func2d = Coefficient(WithGeometry(FunctionSpace(, FiniteElement('Lagrange', triangle, 2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32866)), 48425) def test_2d(func2d): expr = lambda x, y: cos(pi*(y - 0.5))*sin(pi*x) > assert np.allclose(expr(0.10, 0.20), func2d([0.10, 0.20]), rtol=1e-2) tests/regression/test_point_eval_cells.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ufl/ufl/exproperators.py:341: in _call return _eval(self, arg, mapping, component) ../ufl/ufl/exproperators.py:331: in _eval return f.evaluate(coord, mapping, component, index_values) firedrake/function.py:498: in evaluate return self.at(coord) firedrake/function.py:509: in at self.dat._force_evaluation(read=True, write=False) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________________ test_2d[mesh2d5] ________________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...s'), Map(Set((650, 650, 650), 'Cells'), Set((672, 672, 672), 'set_10152'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d68479ae8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('3d4c5a4c67b249b4d98453d6dbad0974', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('3d4c5a4c67b249b4d98453d6dbad0974', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 9, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/07/21f40a06b47094cfe7f43a1d8c411f.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/07/21f40a06b47094cfe7f43a1d8c411f.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: func2d = Coefficient(WithGeometry(FunctionSpace(, FiniteElement('Q', quadrilateral, 2), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 32869)), 48430) def test_2d(func2d): expr = lambda x, y: cos(pi*(y - 0.5))*sin(pi*x) > assert np.allclose(expr(0.10, 0.20), func2d([0.10, 0.20]), rtol=1e-2) tests/regression/test_point_eval_cells.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ufl/ufl/exproperators.py:341: in _call return _eval(self, arg, mapping, component) ../ufl/ufl/exproperators.py:331: in _eval return f.evaluate(coord, mapping, component, index_values) firedrake/function.py:498: in evaluate return self.at(coord) firedrake/function.py:509: in at self.dat._force_evaluation(read=True, write=False) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________________________ test_3d ____________________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----..., Map(Set((3072, 3072, 3072), 'Cells'), Set((729, 729, 729), 'set_10157'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d68460598> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('4f9c188a016f0112a26b648febe0ecc3', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('4f9c188a016f0112a26b648febe0ecc3', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 10, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/49/462e41f2879bdc31096cb4b3453b06.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/49/462e41f2879bdc31096cb4b3453b06.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: func3d = Coefficient(WithGeometry(FunctionSpace(, FiniteElement('Lagrange', tetrahedron, 2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 32872)), 48435) def test_3d(func3d): expr = lambda x, y, z: z*(x - 0.5*y) > assert np.allclose(expr(0.10, 0.20, 0.00), func3d([0.10, 0.20, 0.00])) tests/regression/test_point_eval_cells.py:94: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ufl/ufl/exproperators.py:341: in _call return _eval(self, arg, mapping, component) ../ufl/ufl/exproperators.py:331: in _eval return f.evaluate(coord, mapping, component, index_values) firedrake/function.py:498: in evaluate return self.at(coord) firedrake/function.py:509: in at self.dat._force_evaluation(read=True, write=False) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________________ test_interval[CG-2] ______________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((2, 2, 2), 'set_10174'), 2, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d681fe730> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('a9a8bfdc800291b97da16e366b22f193', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('a9a8bfdc800291b97da16e366b22f193', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/dc/f99ec28058e29f42be51fabeaca6e3.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/dc/f99ec28058e29f42be51fabeaca6e3.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_interval = Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 32881), family = 'CG', degree = 2 @pytest.mark.parametrize(('family', 'degree'), [('CG', 2), ('DG', 2)]) def test_interval(mesh_interval, family, degree): V = FunctionSpace(mesh_interval, family, degree) x = SpatialCoordinate(mesh_interval) f = Function(V).interpolate((x[0] - 0.5)*(x[0] - 0.5)) > assert np.allclose(0.01, f([0.6])) tests/regression/test_point_eval_fs.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ufl/ufl/exproperators.py:341: in _call return _eval(self, arg, mapping, component) ../ufl/ufl/exproperators.py:331: in _eval return f.evaluate(coord, mapping, component, index_values) firedrake/function.py:498: in evaluate return self.at(coord) firedrake/function.py:509: in at self.dat._force_evaluation(read=True, write=False) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________________ test_interval[DG-2] ______________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((2, 2, 2), 'set_10179'), 2, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d687918c8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('a9a8bfdc800291b97da16e366b22f193', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('a9a8bfdc800291b97da16e366b22f193', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/dc/f99ec28058e29f42be51fabeaca6e3.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/dc/f99ec28058e29f42be51fabeaca6e3.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_interval = Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 32884), family = 'DG', degree = 2 @pytest.mark.parametrize(('family', 'degree'), [('CG', 2), ('DG', 2)]) def test_interval(mesh_interval, family, degree): V = FunctionSpace(mesh_interval, family, degree) x = SpatialCoordinate(mesh_interval) f = Function(V).interpolate((x[0] - 0.5)*(x[0] - 0.5)) > assert np.allclose(0.01, f([0.6])) tests/regression/test_point_eval_fs.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ufl/ufl/exproperators.py:341: in _call return _eval(self, arg, mapping, component) ../ufl/ufl/exproperators.py:331: in _eval return f.evaluate(coord, mapping, component, index_values) firedrake/function.py:498: in evaluate return self.at(coord) firedrake/function.py:509: in at self.dat._force_evaluation(read=True, write=False) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_interval_vector[CG-2] ___________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((2, 2, 2), 'set_10184'), 2, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d684d0f28> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('4a91306d0f52b9e8f952ff4c40b6bd49', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('4a91306d0f52b9e8f952ff4c40b6bd49', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/e7/3ac97f06ceb4c400957df43979f69e.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/e7/3ac97f06ceb4c400957df43979f69e.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_interval = Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 32887), family = 'CG', degree = 2 @pytest.mark.parametrize(('family', 'degree'), [('CG', 2), ('DG', 2)]) def test_interval_vector(mesh_interval, family, degree): V = VectorFunctionSpace(mesh_interval, family, degree, dim=2) x = SpatialCoordinate(mesh_interval) f = Function(V).interpolate(as_vector(((x[0] - 0.5)*(x[0] - 0.5), x[0]*x[0]))) > assert np.allclose([0.01, 0.36], f([0.6])) tests/regression/test_point_eval_fs.py:59: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ufl/ufl/exproperators.py:341: in _call return _eval(self, arg, mapping, component) ../ufl/ufl/exproperators.py:331: in _eval return f.evaluate(coord, mapping, component, index_values) firedrake/function.py:498: in evaluate return self.at(coord) firedrake/function.py:509: in at self.dat._force_evaluation(read=True, write=False) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_interval_vector[DG-2] ___________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((2, 2, 2), 'set_10189'), 2, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3db8fa0a60> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('4a91306d0f52b9e8f952ff4c40b6bd49', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('4a91306d0f52b9e8f952ff4c40b6bd49', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/e7/3ac97f06ceb4c400957df43979f69e.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/e7/3ac97f06ceb4c400957df43979f69e.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_interval = Mesh(VectorElement(FiniteElement('Lagrange', interval, 1), dim=1), 32890), family = 'DG', degree = 2 @pytest.mark.parametrize(('family', 'degree'), [('CG', 2), ('DG', 2)]) def test_interval_vector(mesh_interval, family, degree): V = VectorFunctionSpace(mesh_interval, family, degree, dim=2) x = SpatialCoordinate(mesh_interval) f = Function(V).interpolate(as_vector(((x[0] - 0.5)*(x[0] - 0.5), x[0]*x[0]))) > assert np.allclose([0.01, 0.36], f([0.6])) tests/regression/test_point_eval_fs.py:59: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ufl/ufl/exproperators.py:341: in _call return _eval(self, arg, mapping, component) ../ufl/ufl/exproperators.py:331: in _eval return f.evaluate(coord, mapping, component, index_values) firedrake/function.py:498: in evaluate return self.at(coord) firedrake/function.py:509: in at self.dat._force_evaluation(read=True, write=False) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________________ test_triangle[CG-2] ______________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((3, 3, 3), 'set_10194'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3db8fa0620> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('0ca25349ab67492ef352050f6fe557bc', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('0ca25349ab67492ef352050f6fe557bc', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/d1/aab80eb63fd199042d2ba669e69f03.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/d1/aab80eb63fd199042d2ba669e69f03.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_triangle = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32893), family = 'CG', degree = 2 @pytest.mark.parametrize(('family', 'degree'), [('CG', 2), ('DG', 2), ('Bernstein', 2)]) def test_triangle(mesh_triangle, family, degree): V = FunctionSpace(mesh_triangle, family, degree) # Bernstein currently requires projection x = SpatialCoordinate(mesh_triangle) > f = Function(V).project((x[0] - 0.5)*(x[1] - 0.2)) tests/regression/test_point_eval_fs.py:71: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/linear_solver.py:157: in solve with self.inserted_options(), b.dat.vec_ro as rhs, acc as solution: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________________ test_triangle[DG-2] ______________________________________________________________ cls = args = (Kernel(""" template static inline void subkernel0_cell_to_00_cell_integral_otherwise (const Eigen... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((3, 3, 3), 'set_10199'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d98075d08> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('9b8d95100bde13005ba2bfe215006dae', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('9b8d95100bde13005ba2bfe215006dae', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 6, None), (, 6, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'cpp' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/9b/3f825e1b259e38027df2795f6f8c0b.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/9b/3f825e1b259e38027df2795f6f8c0b.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_triangle = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32897), family = 'DG', degree = 2 @pytest.mark.parametrize(('family', 'degree'), [('CG', 2), ('DG', 2), ('Bernstein', 2)]) def test_triangle(mesh_triangle, family, degree): V = FunctionSpace(mesh_triangle, family, degree) # Bernstein currently requires projection x = SpatialCoordinate(mesh_triangle) > f = Function(V).project((x[0] - 0.5)*(x[1] - 0.2)) tests/regression/test_point_eval_fs.py:71: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:153: in solve self.A.force_evaluation() firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicxx', '-fPIC', '-Wall', '-march=native', '-O3', '-ffast-math', ...] executable = b'mpicxx', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_triangle[Bernstein-2] ___________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((3, 3, 3), 'set_10204'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d60177e18> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('75da3a7e77d87504adca72b03fbb3cce', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('75da3a7e77d87504adca72b03fbb3cce', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/74/7ba8d1a72e389614b6e35f16e97c74.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/74/7ba8d1a72e389614b6e35f16e97c74.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_triangle = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32901), family = 'Bernstein', degree = 2 @pytest.mark.parametrize(('family', 'degree'), [('CG', 2), ('DG', 2), ('Bernstein', 2)]) def test_triangle(mesh_triangle, family, degree): V = FunctionSpace(mesh_triangle, family, degree) # Bernstein currently requires projection x = SpatialCoordinate(mesh_triangle) > f = Function(V).project((x[0] - 0.5)*(x[1] - 0.2)) tests/regression/test_point_eval_fs.py:71: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/linear_solver.py:157: in solve with self.inserted_options(), b.dat.vec_ro as rhs, acc as solution: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_triangle_vector[CG-1] ___________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((3, 3, 3), 'set_10209'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3db5ad97b8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('0e3db11d062e61c01c581fd18732f933', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('0e3db11d062e61c01c581fd18732f933', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/23/9869a5f35158ba6a42fcf055d7a4da.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/23/9869a5f35158ba6a42fcf055d7a4da.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_triangle = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32905), family = 'CG', degree = 1 @pytest.mark.parametrize(('family', 'degree'), [('CG', 1), ('DG', 1), ('RT', 2), ('BDM', 2), ('BDFM', 2), ('N1curl', 2), ('N2curl', 2)]) def test_triangle_vector(mesh_triangle, family, degree): x = SpatialCoordinate(mesh_triangle) if family in ['CG', 'DG']: V = VectorFunctionSpace(mesh_triangle, family, degree) f = Function(V).interpolate(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[1]))) else: V = FunctionSpace(mesh_triangle, family, degree) f = Function(V).project(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[1]))) > assert np.allclose([0.6, 0.56], f([0.6, 0.4])) tests/regression/test_point_eval_fs.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ufl/ufl/exproperators.py:341: in _call return _eval(self, arg, mapping, component) ../ufl/ufl/exproperators.py:331: in _eval return f.evaluate(coord, mapping, component, index_values) firedrake/function.py:498: in evaluate return self.at(coord) firedrake/function.py:509: in at self.dat._force_evaluation(read=True, write=False) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_triangle_vector[DG-1] ___________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((3, 3, 3), 'set_10213'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3dcf4c8ea0> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('0e3db11d062e61c01c581fd18732f933', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('0e3db11d062e61c01c581fd18732f933', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/f0/5876e58f866c183051bdcffc7bfa0a.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/f0/5876e58f866c183051bdcffc7bfa0a.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_triangle = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32908), family = 'DG', degree = 1 @pytest.mark.parametrize(('family', 'degree'), [('CG', 1), ('DG', 1), ('RT', 2), ('BDM', 2), ('BDFM', 2), ('N1curl', 2), ('N2curl', 2)]) def test_triangle_vector(mesh_triangle, family, degree): x = SpatialCoordinate(mesh_triangle) if family in ['CG', 'DG']: V = VectorFunctionSpace(mesh_triangle, family, degree) f = Function(V).interpolate(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[1]))) else: V = FunctionSpace(mesh_triangle, family, degree) f = Function(V).project(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[1]))) > assert np.allclose([0.6, 0.56], f([0.6, 0.4])) tests/regression/test_point_eval_fs.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ufl/ufl/exproperators.py:341: in _call return _eval(self, arg, mapping, component) ../ufl/ufl/exproperators.py:331: in _eval return f.evaluate(coord, mapping, component, index_values) firedrake/function.py:498: in evaluate return self.at(coord) firedrake/function.py:509: in at self.dat._force_evaluation(read=True, write=False) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_triangle_vector[RT-2] ___________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((3, 3, 3), 'set_10218'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d60177730> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('99db4cf17aef1304ee52695a321ae64c', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('99db4cf17aef1304ee52695a321ae64c', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 8, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/b5/dcdc482481abd272bc38e44aadbf5c.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/b5/dcdc482481abd272bc38e44aadbf5c.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_triangle = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32911), family = 'RT', degree = 2 @pytest.mark.parametrize(('family', 'degree'), [('CG', 1), ('DG', 1), ('RT', 2), ('BDM', 2), ('BDFM', 2), ('N1curl', 2), ('N2curl', 2)]) def test_triangle_vector(mesh_triangle, family, degree): x = SpatialCoordinate(mesh_triangle) if family in ['CG', 'DG']: V = VectorFunctionSpace(mesh_triangle, family, degree) f = Function(V).interpolate(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[1]))) else: V = FunctionSpace(mesh_triangle, family, degree) > f = Function(V).project(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[1]))) tests/regression/test_point_eval_fs.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/linear_solver.py:157: in solve with self.inserted_options(), b.dat.vec_ro as rhs, acc as solution: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_triangle_vector[BDM-2] __________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((3, 3, 3), 'set_10223'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d5f4f12f0> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('b8281232a666959fc6d82b33449d799f', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('b8281232a666959fc6d82b33449d799f', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 12, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/ad/3f6108f3e8f1a0d0b066a7c4cd2d79.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/ad/3f6108f3e8f1a0d0b066a7c4cd2d79.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_triangle = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32915), family = 'BDM', degree = 2 @pytest.mark.parametrize(('family', 'degree'), [('CG', 1), ('DG', 1), ('RT', 2), ('BDM', 2), ('BDFM', 2), ('N1curl', 2), ('N2curl', 2)]) def test_triangle_vector(mesh_triangle, family, degree): x = SpatialCoordinate(mesh_triangle) if family in ['CG', 'DG']: V = VectorFunctionSpace(mesh_triangle, family, degree) f = Function(V).interpolate(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[1]))) else: V = FunctionSpace(mesh_triangle, family, degree) > f = Function(V).project(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[1]))) tests/regression/test_point_eval_fs.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/linear_solver.py:157: in solve with self.inserted_options(), b.dat.vec_ro as rhs, acc as solution: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________________ test_triangle_vector[BDFM-2] __________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((3, 3, 3), 'set_10228'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3dc45596a8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('ce0311936baa2cac662a6bd7f8eba6d5', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('ce0311936baa2cac662a6bd7f8eba6d5', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 9, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/a8/fa62441647223a96898b79d6ba6d05.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/a8/fa62441647223a96898b79d6ba6d05.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_triangle = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32919), family = 'BDFM', degree = 2 @pytest.mark.parametrize(('family', 'degree'), [('CG', 1), ('DG', 1), ('RT', 2), ('BDM', 2), ('BDFM', 2), ('N1curl', 2), ('N2curl', 2)]) def test_triangle_vector(mesh_triangle, family, degree): x = SpatialCoordinate(mesh_triangle) if family in ['CG', 'DG']: V = VectorFunctionSpace(mesh_triangle, family, degree) f = Function(V).interpolate(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[1]))) else: V = FunctionSpace(mesh_triangle, family, degree) > f = Function(V).project(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[1]))) tests/regression/test_point_eval_fs.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/linear_solver.py:157: in solve with self.inserted_options(), b.dat.vec_ro as rhs, acc as solution: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_triangle_vector[N1curl-2] _________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((3, 3, 3), 'set_10233'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3e62a251e0> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('7ea7b9d6e0eb9fb74ff0ef0efb3bcb37', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('7ea7b9d6e0eb9fb74ff0ef0efb3bcb37', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 8, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/0b/b75e8860fabf564b59480ff620ec24.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/0b/b75e8860fabf564b59480ff620ec24.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_triangle = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32923), family = 'N1curl', degree = 2 @pytest.mark.parametrize(('family', 'degree'), [('CG', 1), ('DG', 1), ('RT', 2), ('BDM', 2), ('BDFM', 2), ('N1curl', 2), ('N2curl', 2)]) def test_triangle_vector(mesh_triangle, family, degree): x = SpatialCoordinate(mesh_triangle) if family in ['CG', 'DG']: V = VectorFunctionSpace(mesh_triangle, family, degree) f = Function(V).interpolate(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[1]))) else: V = FunctionSpace(mesh_triangle, family, degree) > f = Function(V).project(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[1]))) tests/regression/test_point_eval_fs.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/linear_solver.py:157: in solve with self.inserted_options(), b.dat.vec_ro as rhs, acc as solution: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_triangle_vector[N2curl-2] _________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form00_cell_integral_ot... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((3, 3, 3), 'set_10238'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d68791488> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('8aefc19b4243139d28f5b130a9303e66', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('8aefc19b4243139d28f5b130a9303e66', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 12, None), (, 12, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/85/cdd98a066fcc62788d374817ce4290.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/85/cdd98a066fcc62788d374817ce4290.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_triangle = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32927), family = 'N2curl', degree = 2 @pytest.mark.parametrize(('family', 'degree'), [('CG', 1), ('DG', 1), ('RT', 2), ('BDM', 2), ('BDFM', 2), ('N1curl', 2), ('N2curl', 2)]) def test_triangle_vector(mesh_triangle, family, degree): x = SpatialCoordinate(mesh_triangle) if family in ['CG', 'DG']: V = VectorFunctionSpace(mesh_triangle, family, degree) f = Function(V).interpolate(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[1]))) else: V = FunctionSpace(mesh_triangle, family, degree) > f = Function(V).project(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[1]))) tests/regression/test_point_eval_fs.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:158: in apply_massinv return self.solver.solve ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:144: in solver return firedrake.LinearSolver(self.A, solver_parameters=self.solver_parameters) firedrake/linear_solver.py:97: in __init__ self.A.force_evaluation() firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_triangle_tensor[CG-1] ___________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((3, 3, 3), 'set_10243'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d514f2ea0> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('b647b376f0d7383daab92f2b1915bf62', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('b647b376f0d7383daab92f2b1915bf62', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (2, 2), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/1b/62c8ad3186dd9a8eaa24ee2d779a98.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/1b/62c8ad3186dd9a8eaa24ee2d779a98.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_triangle = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32930), family = 'CG', degree = 1 @pytest.mark.parametrize(('family', 'degree'), [('CG', 1), ('DG', 1)]) def test_triangle_tensor(mesh_triangle, family, degree): V = TensorFunctionSpace(mesh_triangle, family, degree) x = SpatialCoordinate(mesh_triangle) f = Function(V).interpolate(as_tensor(((x[1], 0.2 + x[0]), (0.8*x[0], 0.2*x[1])))) > assert np.allclose([[0.4, 0.8], [0.48, 0.08]], f([0.6, 0.4])) tests/regression/test_point_eval_fs.py:105: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ufl/ufl/exproperators.py:341: in _call return _eval(self, arg, mapping, component) ../ufl/ufl/exproperators.py:331: in _eval return f.evaluate(coord, mapping, component, index_values) firedrake/function.py:498: in evaluate return self.at(coord) firedrake/function.py:509: in at self.dat._force_evaluation(read=True, write=False) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_triangle_tensor[DG-1] ___________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((3, 3, 3), 'set_10247'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d54e1d400> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('b647b376f0d7383daab92f2b1915bf62', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('b647b376f0d7383daab92f2b1915bf62', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (2, 2), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/3e/1410384216457390e03b4ea8593727.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/3e/1410384216457390e03b4ea8593727.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_triangle = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32933), family = 'DG', degree = 1 @pytest.mark.parametrize(('family', 'degree'), [('CG', 1), ('DG', 1)]) def test_triangle_tensor(mesh_triangle, family, degree): V = TensorFunctionSpace(mesh_triangle, family, degree) x = SpatialCoordinate(mesh_triangle) f = Function(V).interpolate(as_tensor(((x[1], 0.2 + x[0]), (0.8*x[0], 0.2*x[1])))) > assert np.allclose([[0.4, 0.8], [0.48, 0.08]], f([0.6, 0.4])) tests/regression/test_point_eval_fs.py:105: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ufl/ufl/exproperators.py:341: in _call return _eval(self, arg, mapping, component) ../ufl/ufl/exproperators.py:331: in _eval return f.evaluate(coord, mapping, component, index_values) firedrake/function.py:498: in evaluate return self.at(coord) firedrake/function.py:509: in at self.dat._force_evaluation(read=True, write=False) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________________ test_triangle_mixed ______________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((3, 3, 3), 'set_10252'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d68479510> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('9ca338067996507d2fffa827bf681955', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('9ca338067996507d2fffa827bf681955', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 8, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/98/9d175ed45107baa119037abfbf34be.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/98/9d175ed45107baa119037abfbf34be.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_triangle = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32936) def test_triangle_mixed(mesh_triangle): V1 = FunctionSpace(mesh_triangle, "DG", 1) V2 = FunctionSpace(mesh_triangle, "RT", 2) V = V1 * V2 f = Function(V) f1, f2 = f.split() x = SpatialCoordinate(mesh_triangle) f1.interpolate(x[0] + 1.2*x[1]) > f2.project(as_vector((x[1], 0.8 + x[0]))) tests/regression/test_point_eval_fs.py:117: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/linear_solver.py:157: in solve with self.inserted_options(), b.dat.vec_ro as rhs, acc as solution: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________________ test_quadrilateral[CG-2] ____________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((4, 4, 4), 'set_10258'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d62dcebf8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('01a2c0264c6780af8978d45572ea8b21', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('01a2c0264c6780af8978d45572ea8b21', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 9, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/3f/8d85c7ba93bacd7f95c6ee86f71967.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/3f/8d85c7ba93bacd7f95c6ee86f71967.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_quadrilateral = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 32944), family = 'CG', degree = 2 @pytest.mark.parametrize(('family', 'degree'), [('CG', 2), ('DG', 2)]) def test_quadrilateral(mesh_quadrilateral, family, degree): V = FunctionSpace(mesh_quadrilateral, family, degree) x = SpatialCoordinate(mesh_quadrilateral) f = Function(V).interpolate((x[0] - 0.5)*(x[1] - 0.2)) > assert np.allclose(+0.02, f([0.6, 0.4])) tests/regression/test_point_eval_fs.py:144: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ufl/ufl/exproperators.py:341: in _call return _eval(self, arg, mapping, component) ../ufl/ufl/exproperators.py:331: in _eval return f.evaluate(coord, mapping, component, index_values) firedrake/function.py:498: in evaluate return self.at(coord) firedrake/function.py:509: in at self.dat._force_evaluation(read=True, write=False) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________________ test_quadrilateral[DG-2] ____________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((4, 4, 4), 'set_10263'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d52f692f0> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('01a2c0264c6780af8978d45572ea8b21', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('01a2c0264c6780af8978d45572ea8b21', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 9, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/3f/8d85c7ba93bacd7f95c6ee86f71967.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/3f/8d85c7ba93bacd7f95c6ee86f71967.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_quadrilateral = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 32947), family = 'DG', degree = 2 @pytest.mark.parametrize(('family', 'degree'), [('CG', 2), ('DG', 2)]) def test_quadrilateral(mesh_quadrilateral, family, degree): V = FunctionSpace(mesh_quadrilateral, family, degree) x = SpatialCoordinate(mesh_quadrilateral) f = Function(V).interpolate((x[0] - 0.5)*(x[1] - 0.2)) > assert np.allclose(+0.02, f([0.6, 0.4])) tests/regression/test_point_eval_fs.py:144: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ufl/ufl/exproperators.py:341: in _call return _eval(self, arg, mapping, component) ../ufl/ufl/exproperators.py:331: in _eval return f.evaluate(coord, mapping, component, index_values) firedrake/function.py:498: in evaluate return self.at(coord) firedrake/function.py:509: in at self.dat._force_evaluation(read=True, write=False) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_quadrilateral_vector[CG-1] ________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((4, 4, 4), 'set_10268'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d68282ea0> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('8ca115e0e4f955a70d85525d39ea20f6', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('8ca115e0e4f955a70d85525d39ea20f6', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/2c/1dba8ff5d05fa7d529b0ee2696a021.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/2c/1dba8ff5d05fa7d529b0ee2696a021.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_quadrilateral = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 32950), family = 'CG', degree = 1 @pytest.mark.parametrize(('family', 'degree'), [('CG', 1), ('DG', 1), ('RTCF', 2), ('RTCE', 2)]) def test_quadrilateral_vector(mesh_quadrilateral, family, degree): x = SpatialCoordinate(mesh_quadrilateral) if family in ['CG', 'DG']: V = VectorFunctionSpace(mesh_quadrilateral, family, degree) f = Function(V).interpolate(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[1]))) else: V = FunctionSpace(mesh_quadrilateral, family, degree) f = Function(V).project(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[1]))) > assert np.allclose([0.6, 0.56], f([0.6, 0.4])) tests/regression/test_point_eval_fs.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ufl/ufl/exproperators.py:341: in _call return _eval(self, arg, mapping, component) ../ufl/ufl/exproperators.py:331: in _eval return f.evaluate(coord, mapping, component, index_values) firedrake/function.py:498: in evaluate return self.at(coord) firedrake/function.py:509: in at self.dat._force_evaluation(read=True, write=False) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_quadrilateral_vector[DG-1] ________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((4, 4, 4), 'set_10272'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d62dceae8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('8ca115e0e4f955a70d85525d39ea20f6', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('8ca115e0e4f955a70d85525d39ea20f6', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/fa/129412063191c614cbd01a92adecd9.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/fa/129412063191c614cbd01a92adecd9.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_quadrilateral = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 32953), family = 'DG', degree = 1 @pytest.mark.parametrize(('family', 'degree'), [('CG', 1), ('DG', 1), ('RTCF', 2), ('RTCE', 2)]) def test_quadrilateral_vector(mesh_quadrilateral, family, degree): x = SpatialCoordinate(mesh_quadrilateral) if family in ['CG', 'DG']: V = VectorFunctionSpace(mesh_quadrilateral, family, degree) f = Function(V).interpolate(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[1]))) else: V = FunctionSpace(mesh_quadrilateral, family, degree) f = Function(V).project(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[1]))) > assert np.allclose([0.6, 0.56], f([0.6, 0.4])) tests/regression/test_point_eval_fs.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ufl/ufl/exproperators.py:341: in _call return _eval(self, arg, mapping, component) ../ufl/ufl/exproperators.py:331: in _eval return f.evaluate(coord, mapping, component, index_values) firedrake/function.py:498: in evaluate return self.at(coord) firedrake/function.py:509: in at self.dat._force_evaluation(read=True, write=False) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_quadrilateral_vector[RTCF-2] _______________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form00_cell_integral_ot... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((4, 4, 4), 'set_10277'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d98d28c80> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('b6a5181a671aff1274672b71f614871e', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('b6a5181a671aff1274672b71f614871e', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 12, None), (, 12, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/fe/d2766b17c1a6bf6763a4f355dd831f.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/fe/d2766b17c1a6bf6763a4f355dd831f.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_quadrilateral = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 32956), family = 'RTCF', degree = 2 @pytest.mark.parametrize(('family', 'degree'), [('CG', 1), ('DG', 1), ('RTCF', 2), ('RTCE', 2)]) def test_quadrilateral_vector(mesh_quadrilateral, family, degree): x = SpatialCoordinate(mesh_quadrilateral) if family in ['CG', 'DG']: V = VectorFunctionSpace(mesh_quadrilateral, family, degree) f = Function(V).interpolate(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[1]))) else: V = FunctionSpace(mesh_quadrilateral, family, degree) > f = Function(V).project(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[1]))) tests/regression/test_point_eval_fs.py:160: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:158: in apply_massinv return self.solver.solve ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:144: in solver return firedrake.LinearSolver(self.A, solver_parameters=self.solver_parameters) firedrake/linear_solver.py:97: in __init__ self.A.force_evaluation() firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_quadrilateral_vector[RTCE-2] _______________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form00_cell_integral_ot... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((4, 4, 4), 'set_10282'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d9b85ba60> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('e01a330ab6259dfa6a15b918d76fe546', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('e01a330ab6259dfa6a15b918d76fe546', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 12, None), (, 12, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/f0/38bdb7ca06d797b8ddfbc7d7621870.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/f0/38bdb7ca06d797b8ddfbc7d7621870.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_quadrilateral = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 32959), family = 'RTCE', degree = 2 @pytest.mark.parametrize(('family', 'degree'), [('CG', 1), ('DG', 1), ('RTCF', 2), ('RTCE', 2)]) def test_quadrilateral_vector(mesh_quadrilateral, family, degree): x = SpatialCoordinate(mesh_quadrilateral) if family in ['CG', 'DG']: V = VectorFunctionSpace(mesh_quadrilateral, family, degree) f = Function(V).interpolate(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[1]))) else: V = FunctionSpace(mesh_quadrilateral, family, degree) > f = Function(V).project(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[1]))) tests/regression/test_point_eval_fs.py:160: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:158: in apply_massinv return self.solver.solve ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:144: in solver return firedrake.LinearSolver(self.A, solver_parameters=self.solver_parameters) firedrake/linear_solver.py:97: in __init__ self.A.force_evaluation() firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________________ test_tetrahedron[CG-2] _____________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((4, 4, 4), 'set_10287'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d5de3f2f0> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('0189844de76401145dfedbfc31c27e02', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('0189844de76401145dfedbfc31c27e02', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 10, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/c0/9daf04aee53a94d8e21972d21bc419.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/c0/9daf04aee53a94d8e21972d21bc419.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_tetrahedron = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 32962), family = 'CG', degree = 2 @pytest.mark.parametrize(('family', 'degree'), [('CG', 2), ('DG', 2)]) def test_tetrahedron(mesh_tetrahedron, family, degree): V = FunctionSpace(mesh_tetrahedron, family, degree) x = SpatialCoordinate(mesh_tetrahedron) f = Function(V).interpolate((x[0] - 0.5)*(x[1] - x[2])) > assert np.allclose(+0.01, f([0.6, 0.4, 0.3])) tests/regression/test_point_eval_fs.py:173: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ufl/ufl/exproperators.py:341: in _call return _eval(self, arg, mapping, component) ../ufl/ufl/exproperators.py:331: in _eval return f.evaluate(coord, mapping, component, index_values) firedrake/function.py:498: in evaluate return self.at(coord) firedrake/function.py:509: in at self.dat._force_evaluation(read=True, write=False) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________________ test_tetrahedron[DG-2] _____________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((4, 4, 4), 'set_10292'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3db5ad9048> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('0189844de76401145dfedbfc31c27e02', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('0189844de76401145dfedbfc31c27e02', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 10, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/c0/9daf04aee53a94d8e21972d21bc419.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/c0/9daf04aee53a94d8e21972d21bc419.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_tetrahedron = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 32965), family = 'DG', degree = 2 @pytest.mark.parametrize(('family', 'degree'), [('CG', 2), ('DG', 2)]) def test_tetrahedron(mesh_tetrahedron, family, degree): V = FunctionSpace(mesh_tetrahedron, family, degree) x = SpatialCoordinate(mesh_tetrahedron) f = Function(V).interpolate((x[0] - 0.5)*(x[1] - x[2])) > assert np.allclose(+0.01, f([0.6, 0.4, 0.3])) tests/regression/test_point_eval_fs.py:173: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ufl/ufl/exproperators.py:341: in _call return _eval(self, arg, mapping, component) ../ufl/ufl/exproperators.py:331: in _eval return f.evaluate(coord, mapping, component, index_values) firedrake/function.py:498: in evaluate return self.at(coord) firedrake/function.py:509: in at self.dat._force_evaluation(read=True, write=False) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________________ test_tetrahedron_vector[CG-1] _________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((4, 4, 4), 'set_10297'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3db9aab048> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('9eeed9076459879b270c7ea21d9a1e55', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('9eeed9076459879b270c7ea21d9a1e55', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/25/b02d807221a0c3fd2978b4da134ce7.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/25/b02d807221a0c3fd2978b4da134ce7.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_tetrahedron = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 32968), family = 'CG', degree = 1 @pytest.mark.parametrize(('family', 'degree'), [('CG', 1), ('DG', 1), ('N1F', 2), ('N2F', 2), ('N1E', 2), ('N2E', 2)]) def test_tetrahedron_vector(mesh_tetrahedron, family, degree): x = SpatialCoordinate(mesh_tetrahedron) if family in ['CG', 'DG']: V = VectorFunctionSpace(mesh_tetrahedron, family, degree) f = Function(V).interpolate(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[2], x[1]))) else: V = FunctionSpace(mesh_tetrahedron, family, degree) f = Function(V).project(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[2], x[1]))) > assert np.allclose([0.6, 0.54, 0.4], f([0.6, 0.4, 0.3])) tests/regression/test_point_eval_fs.py:193: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ufl/ufl/exproperators.py:341: in _call return _eval(self, arg, mapping, component) ../ufl/ufl/exproperators.py:331: in _eval return f.evaluate(coord, mapping, component, index_values) firedrake/function.py:498: in evaluate return self.at(coord) firedrake/function.py:509: in at self.dat._force_evaluation(read=True, write=False) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________________ test_tetrahedron_vector[DG-1] _________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((4, 4, 4), 'set_10301'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d5de3f9d8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('9eeed9076459879b270c7ea21d9a1e55', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('9eeed9076459879b270c7ea21d9a1e55', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/d7/bb7e81486723495617fca356c96210.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/d7/bb7e81486723495617fca356c96210.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_tetrahedron = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 32971), family = 'DG', degree = 1 @pytest.mark.parametrize(('family', 'degree'), [('CG', 1), ('DG', 1), ('N1F', 2), ('N2F', 2), ('N1E', 2), ('N2E', 2)]) def test_tetrahedron_vector(mesh_tetrahedron, family, degree): x = SpatialCoordinate(mesh_tetrahedron) if family in ['CG', 'DG']: V = VectorFunctionSpace(mesh_tetrahedron, family, degree) f = Function(V).interpolate(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[2], x[1]))) else: V = FunctionSpace(mesh_tetrahedron, family, degree) f = Function(V).project(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[2], x[1]))) > assert np.allclose([0.6, 0.54, 0.4], f([0.6, 0.4, 0.3])) tests/regression/test_point_eval_fs.py:193: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../ufl/ufl/exproperators.py:341: in _call return _eval(self, arg, mapping, component) ../ufl/ufl/exproperators.py:331: in _eval return f.evaluate(coord, mapping, component, index_values) firedrake/function.py:498: in evaluate return self.at(coord) firedrake/function.py:509: in at self.dat._force_evaluation(read=True, write=False) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_tetrahedron_vector[N1F-2] _________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form00_cell_integral_ot... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((4, 4, 4), 'set_10306'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d5de3f6a8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('39ecbcae326599d4b373153dcd83272a', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('39ecbcae326599d4b373153dcd83272a', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 15, None), (, 15, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/03/5a5fac6508eabcf3d7e2c0b239e2d3.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/03/5a5fac6508eabcf3d7e2c0b239e2d3.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_tetrahedron = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 32974), family = 'N1F', degree = 2 @pytest.mark.parametrize(('family', 'degree'), [('CG', 1), ('DG', 1), ('N1F', 2), ('N2F', 2), ('N1E', 2), ('N2E', 2)]) def test_tetrahedron_vector(mesh_tetrahedron, family, degree): x = SpatialCoordinate(mesh_tetrahedron) if family in ['CG', 'DG']: V = VectorFunctionSpace(mesh_tetrahedron, family, degree) f = Function(V).interpolate(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[2], x[1]))) else: V = FunctionSpace(mesh_tetrahedron, family, degree) > f = Function(V).project(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[2], x[1]))) tests/regression/test_point_eval_fs.py:191: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:158: in apply_massinv return self.solver.solve ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:144: in solver return firedrake.LinearSolver(self.A, solver_parameters=self.solver_parameters) firedrake/linear_solver.py:97: in __init__ self.A.force_evaluation() firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_tetrahedron_vector[N2F-2] _________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form00_cell_integral_ot... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((4, 4, 4), 'set_10311'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d975527b8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('4a68fe8cce076598f4300f4125c81a44', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('4a68fe8cce076598f4300f4125c81a44', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 30, None), (, 30, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/ef/044757c092d2cf54c57525b779f970.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/ef/044757c092d2cf54c57525b779f970.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_tetrahedron = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 32977), family = 'N2F', degree = 2 @pytest.mark.parametrize(('family', 'degree'), [('CG', 1), ('DG', 1), ('N1F', 2), ('N2F', 2), ('N1E', 2), ('N2E', 2)]) def test_tetrahedron_vector(mesh_tetrahedron, family, degree): x = SpatialCoordinate(mesh_tetrahedron) if family in ['CG', 'DG']: V = VectorFunctionSpace(mesh_tetrahedron, family, degree) f = Function(V).interpolate(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[2], x[1]))) else: V = FunctionSpace(mesh_tetrahedron, family, degree) > f = Function(V).project(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[2], x[1]))) tests/regression/test_point_eval_fs.py:191: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:158: in apply_massinv return self.solver.solve ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:144: in solver return firedrake.LinearSolver(self.A, solver_parameters=self.solver_parameters) firedrake/linear_solver.py:97: in __init__ self.A.force_evaluation() firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_tetrahedron_vector[N1E-2] _________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form00_cell_integral_ot... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((4, 4, 4), 'set_10316'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3e02875c80> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('1d84cd64d14ef452089f7625230614c0', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('1d84cd64d14ef452089f7625230614c0', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 20, None), (, 20, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/fa/d8323c2c1ea818a26f5e74702752f1.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/fa/d8323c2c1ea818a26f5e74702752f1.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_tetrahedron = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 32980), family = 'N1E', degree = 2 @pytest.mark.parametrize(('family', 'degree'), [('CG', 1), ('DG', 1), ('N1F', 2), ('N2F', 2), ('N1E', 2), ('N2E', 2)]) def test_tetrahedron_vector(mesh_tetrahedron, family, degree): x = SpatialCoordinate(mesh_tetrahedron) if family in ['CG', 'DG']: V = VectorFunctionSpace(mesh_tetrahedron, family, degree) f = Function(V).interpolate(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[2], x[1]))) else: V = FunctionSpace(mesh_tetrahedron, family, degree) > f = Function(V).project(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[2], x[1]))) tests/regression/test_point_eval_fs.py:191: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:158: in apply_massinv return self.solver.solve ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:144: in solver return firedrake.LinearSolver(self.A, solver_parameters=self.solver_parameters) firedrake/linear_solver.py:97: in __init__ self.A.force_evaluation() firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_tetrahedron_vector[N2E-2] _________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form00_cell_integral_ot... 'Coordinates'), Map(Set((1, 1, 1), 'Cells'), Set((4, 4, 4), 'set_10321'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d60e308c8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('d9cbb438adfec41e443d9bb911f11127', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('d9cbb438adfec41e443d9bb911f11127', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 30, None), (, 30, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/f3/816ec81cbd34adefeb5b3d9bdeb18f.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/f3/816ec81cbd34adefeb5b3d9bdeb18f.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: mesh_tetrahedron = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 32983), family = 'N2E', degree = 2 @pytest.mark.parametrize(('family', 'degree'), [('CG', 1), ('DG', 1), ('N1F', 2), ('N2F', 2), ('N1E', 2), ('N2E', 2)]) def test_tetrahedron_vector(mesh_tetrahedron, family, degree): x = SpatialCoordinate(mesh_tetrahedron) if family in ['CG', 'DG']: V = VectorFunctionSpace(mesh_tetrahedron, family, degree) f = Function(V).interpolate(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[2], x[1]))) else: V = FunctionSpace(mesh_tetrahedron, family, degree) > f = Function(V).project(as_vector((0.2 + x[1], 0.8*x[0] + 0.2*x[2], x[1]))) tests/regression/test_point_eval_fs.py:191: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:158: in apply_massinv return self.solver.solve ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:144: in solver return firedrake.LinearSolver(self.A, solver_parameters=self.solver_parameters) firedrake/linear_solver.py:97: in __init__ self.A.force_evaluation() firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________________ test_point_eval_forces_writes _________________________________________________________ self = Coefficient(WithGeometry(FunctionSpace(, FiniteElement('Disconti...Lagrange', triangle, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32986)), 48639) tolerance = None def _c_evaluate(self, tolerance=None): cache = self.__dict__.setdefault("_c_evaluate_cache", {}) try: > return cache[tolerance] E KeyError: None firedrake/function.py:487: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = .StrCode object at 0x7f3cc4e1cf60> extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/c9/0375be188f315934edfc1841c0a70f.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/c9/0375be188f315934edfc1841c0a70f.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: def test_point_eval_forces_writes(): m = UnitTriangleMesh() V = FunctionSpace(m, 'DG', 0) f = Function(V) > assert np.allclose([0.0], f.at((0.3, 0.3))) tests/regression/test_point_eval_fs.py:202: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:573: in at single_eval(points[i:i+1], p_result) firedrake/function.py:551: in single_eval err = self._c_evaluate(tolerance=tolerance)(self._ctypes, firedrake/function.py:489: in _c_evaluate result = make_c_evaluate(self, tolerance=tolerance) firedrake/function.py:664: in make_c_evaluate comm=function.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________________ test_point_reset_works _____________________________________________________________ self = Coefficient(WithGeometry(FunctionSpace(, FiniteElement('Disconti...Lagrange', triangle, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 32990)), 48647) tolerance = None def _c_evaluate(self, tolerance=None): cache = self.__dict__.setdefault("_c_evaluate_cache", {}) try: > return cache[tolerance] E KeyError: None firedrake/function.py:487: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = .StrCode object at 0x7f3cc3b57978> extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/c9/0375be188f315934edfc1841c0a70f.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/c9/0375be188f315934edfc1841c0a70f.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: def test_point_reset_works(): m = UnitTriangleMesh() V = FunctionSpace(m, 'DG', 0) f = Function(V) > assert np.allclose([0.0], f.at((0.3, 0.3))) tests/regression/test_point_eval_fs.py:212: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:573: in at single_eval(points[i:i+1], p_result) firedrake/function.py:551: in single_eval err = self._c_evaluate(tolerance=tolerance)(self._ctypes, firedrake/function.py:489: in _c_evaluate result = make_c_evaluate(self, tolerance=tolerance) firedrake/function.py:664: in make_c_evaluate comm=function.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_poisson_mixed[parameters0] ________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...ates'), Map(Set((128, 128, 128), 'Cells'), Set((81, 81, 81), 'set_10336'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d99a9a400> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('47e2e77cea78b8112f34392b862031a0', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('47e2e77cea78b8112f34392b862031a0', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/26/221d80480b77a3b89dcaabe9971e35.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/26/221d80480b77a3b89dcaabe9971e35.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: parameters = {} @pytest.mark.parametrize('parameters', [{}, {'pc_type': 'fieldsplit', 'pc_fieldsplit_type': 'schur', 'ksp_type': 'gmres', 'pc_fieldsplit_schur_fact_type': 'FULL', 'fieldsplit_0_ksp_type': 'cg', 'fieldsplit_0_pc_factor_shift_type': 'INBLOCKS', 'fieldsplit_1_pc_factor_shift_type': 'INBLOCKS', 'fieldsplit_1_ksp_type': 'cg'}]) def test_poisson_mixed(parameters): """Test second-order convergence of the mixed poisson formulation.""" > diff = np.array([poisson_mixed(i, parameters)[0] for i in range(3, 6)]) tests/regression/test_poisson_mixed_no_bcs.py:76: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_mixed_no_bcs.py:76: in diff = np.array([poisson_mixed(i, parameters)[0] for i in range(3, 6)]) tests/regression/test_poisson_mixed_no_bcs.py:62: in poisson_mixed return sqrt(assemble(dot(u - f, u - f) * dx)), u, f firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('72d50ef6d24fcfd186550799e1a58fc7', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/aa/01fba8522056e38d336e2e50f5b07a.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 412, in vecscatter with d.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________________________ test_poisson_mixed[parameters1] ________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...ates'), Map(Set((128, 128, 128), 'Cells'), Set((81, 81, 81), 'set_10342'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d97552a60> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('47e2e77cea78b8112f34392b862031a0', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('47e2e77cea78b8112f34392b862031a0', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/26/221d80480b77a3b89dcaabe9971e35.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/26/221d80480b77a3b89dcaabe9971e35.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: parameters = {'fieldsplit_0_ksp_type': 'cg', 'fieldsplit_0_pc_factor_shift_type': 'INBLOCKS', 'fieldsplit_1_ksp_type': 'cg', 'fieldsplit_1_pc_factor_shift_type': 'INBLOCKS', ...} @pytest.mark.parametrize('parameters', [{}, {'pc_type': 'fieldsplit', 'pc_fieldsplit_type': 'schur', 'ksp_type': 'gmres', 'pc_fieldsplit_schur_fact_type': 'FULL', 'fieldsplit_0_ksp_type': 'cg', 'fieldsplit_0_pc_factor_shift_type': 'INBLOCKS', 'fieldsplit_1_pc_factor_shift_type': 'INBLOCKS', 'fieldsplit_1_ksp_type': 'cg'}]) def test_poisson_mixed(parameters): """Test second-order convergence of the mixed poisson formulation.""" > diff = np.array([poisson_mixed(i, parameters)[0] for i in range(3, 6)]) tests/regression/test_poisson_mixed_no_bcs.py:76: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_mixed_no_bcs.py:76: in diff = np.array([poisson_mixed(i, parameters)[0] for i in range(3, 6)]) tests/regression/test_poisson_mixed_no_bcs.py:62: in poisson_mixed return sqrt(assemble(dot(u - f, u - f) * dx)), u, f firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('72d50ef6d24fcfd186550799e1a58fc7', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/aa/01fba8522056e38d336e2e50f5b07a.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 412, in vecscatter with d.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________________________ test_hdiv_convergence[testcase0-1.9] ______________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...dinates'), Map(Set((64, 64, 64), 'Cells'), Set((81, 81, 81), 'set_10348'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d6878da60> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('24d0a6cb8a1c6e5984b55f6d17d260e1', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('24d0a6cb8a1c6e5984b55f6d17d260e1', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/63/fb6890c9b49add8ebf22bd883de014.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/63/fb6890c9b49add8ebf22bd883de014.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: testcase = (3, 6), convrate = 1.9 @pytest.mark.parametrize(('testcase', 'convrate'), [((3, 6), 1.9)]) def test_hdiv_convergence(testcase, convrate): """Test second-order convergence of the mixed poisson formulation on quadrilaterals with H(div) elements.""" start, end = testcase l2err = np.zeros(end - start) for ii in [i + start for i in range(len(l2err))]: > l2err[ii - start] = poisson_mixed(ii, quadrilateral=True)[0] tests/regression/test_poisson_mixed_no_bcs.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_mixed_no_bcs.py:62: in poisson_mixed return sqrt(assemble(dot(u - f, u - f) * dx)), u, f firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('f034d5456224ebed2e4dde12efc4fccb', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/02/593c0dcdcc2c3ff0f1e2330c551bdc.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 412, in vecscatter with d.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('1acb369b3672a28f19c48b759b51701d', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 2, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/4e/6dd81dd6dbc9a8914dbc34d8352423.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 289, in form_jacobian X.copy(v) File "/usr/lib/python3.6/contextlib.py", line 88, in __exit__ next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 419, in vecscatter with d.vec_wo as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________________________ test_poisson_mixed[parameters0-False] _____________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...ates'), Map(Set((128, 128, 128), 'Cells'), Set((81, 81, 81), 'set_10354'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d62e510d0> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('f6b2527f414d8344f6adba5306e61dd1', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('f6b2527f414d8344f6adba5306e61dd1', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/ec/d7c760b0a60e5590aad87175c33eff.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/ec/d7c760b0a60e5590aad87175c33eff.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: parameters = {}, quadrilateral = False @pytest.mark.parametrize('quadrilateral', [False, True]) @pytest.mark.parametrize('parameters', [{}, {'ksp_type': 'fgmres', 'pc_type': 'fieldsplit', 'pc_fieldsplit_type': 'schur', 'pc_fieldsplit_schur_fact_type': 'diag', 'fieldsplit_0_ksp_type': 'preonly', 'fieldsplit_0_pc_type': 'icc', 'fieldsplit_1_ksp_type': 'cg', 'fieldsplit_1_pc_type': 'none'}]) def test_poisson_mixed(parameters, quadrilateral): > assert poisson_mixed(3, parameters, quadrilateral=quadrilateral) < 2e-5 tests/regression/test_poisson_mixed_strong_bcs.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_mixed_strong_bcs.py:62: in poisson_mixed return sqrt(assemble(dot(u - f, u - f) * dx)) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('cce945a082319da71fe9789eaf1c4764', , False, False, True, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, , Access('READ'), (, dtype('uint32'), (, (1,), (,))), None, False, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/23/f86df669d41153e3e5231221784115.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 412, in vecscatter with d.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________________________ test_poisson_mixed[parameters0-True] ______________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...dinates'), Map(Set((64, 64, 64), 'Cells'), Set((81, 81, 81), 'set_10360'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d595fb378> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('7b3ff0cefa17413868bf43f727e9becd', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('7b3ff0cefa17413868bf43f727e9becd', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/90/8b8a9066f69c170e3c7e57955eac63.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/90/8b8a9066f69c170e3c7e57955eac63.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: parameters = {}, quadrilateral = True @pytest.mark.parametrize('quadrilateral', [False, True]) @pytest.mark.parametrize('parameters', [{}, {'ksp_type': 'fgmres', 'pc_type': 'fieldsplit', 'pc_fieldsplit_type': 'schur', 'pc_fieldsplit_schur_fact_type': 'diag', 'fieldsplit_0_ksp_type': 'preonly', 'fieldsplit_0_pc_type': 'icc', 'fieldsplit_1_ksp_type': 'cg', 'fieldsplit_1_pc_type': 'none'}]) def test_poisson_mixed(parameters, quadrilateral): > assert poisson_mixed(3, parameters, quadrilateral=quadrilateral) < 2e-5 tests/regression/test_poisson_mixed_strong_bcs.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_mixed_strong_bcs.py:62: in poisson_mixed return sqrt(assemble(dot(u - f, u - f) * dx)) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('b3ee53611d94248501f3432962e7e053', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 2, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 2, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/af/2032be907cac2e532bc667753d24a9.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 412, in vecscatter with d.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('1acb369b3672a28f19c48b759b51701d', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 2, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/4e/6dd81dd6dbc9a8914dbc34d8352423.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 289, in form_jacobian X.copy(v) File "/usr/lib/python3.6/contextlib.py", line 88, in __exit__ next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 419, in vecscatter with d.vec_wo as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________________________ test_poisson_mixed[parameters1-False] _____________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...ates'), Map(Set((128, 128, 128), 'Cells'), Set((81, 81, 81), 'set_10366'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d6819ad90> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('f6b2527f414d8344f6adba5306e61dd1', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('f6b2527f414d8344f6adba5306e61dd1', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/ec/d7c760b0a60e5590aad87175c33eff.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/ec/d7c760b0a60e5590aad87175c33eff.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: parameters = {'fieldsplit_0_ksp_type': 'preonly', 'fieldsplit_0_pc_type': 'icc', 'fieldsplit_1_ksp_type': 'cg', 'fieldsplit_1_pc_type': 'none', ...} quadrilateral = False @pytest.mark.parametrize('quadrilateral', [False, True]) @pytest.mark.parametrize('parameters', [{}, {'ksp_type': 'fgmres', 'pc_type': 'fieldsplit', 'pc_fieldsplit_type': 'schur', 'pc_fieldsplit_schur_fact_type': 'diag', 'fieldsplit_0_ksp_type': 'preonly', 'fieldsplit_0_pc_type': 'icc', 'fieldsplit_1_ksp_type': 'cg', 'fieldsplit_1_pc_type': 'none'}]) def test_poisson_mixed(parameters, quadrilateral): > assert poisson_mixed(3, parameters, quadrilateral=quadrilateral) < 2e-5 tests/regression/test_poisson_mixed_strong_bcs.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_mixed_strong_bcs.py:62: in poisson_mixed return sqrt(assemble(dot(u - f, u - f) * dx)) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('cce945a082319da71fe9789eaf1c4764', , False, False, True, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, , Access('READ'), (, dtype('uint32'), (, (1,), (,))), None, False, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/23/f86df669d41153e3e5231221784115.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 412, in vecscatter with d.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________________________ test_poisson_mixed[parameters1-True] ______________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...dinates'), Map(Set((64, 64, 64), 'Cells'), Set((81, 81, 81), 'set_10372'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3db9444bf8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('7b3ff0cefa17413868bf43f727e9becd', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('7b3ff0cefa17413868bf43f727e9becd', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/90/8b8a9066f69c170e3c7e57955eac63.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/90/8b8a9066f69c170e3c7e57955eac63.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: parameters = {'fieldsplit_0_ksp_type': 'preonly', 'fieldsplit_0_pc_type': 'icc', 'fieldsplit_1_ksp_type': 'cg', 'fieldsplit_1_pc_type': 'none', ...} quadrilateral = True @pytest.mark.parametrize('quadrilateral', [False, True]) @pytest.mark.parametrize('parameters', [{}, {'ksp_type': 'fgmres', 'pc_type': 'fieldsplit', 'pc_fieldsplit_type': 'schur', 'pc_fieldsplit_schur_fact_type': 'diag', 'fieldsplit_0_ksp_type': 'preonly', 'fieldsplit_0_pc_type': 'icc', 'fieldsplit_1_ksp_type': 'cg', 'fieldsplit_1_pc_type': 'none'}]) def test_poisson_mixed(parameters, quadrilateral): > assert poisson_mixed(3, parameters, quadrilateral=quadrilateral) < 2e-5 tests/regression/test_poisson_mixed_strong_bcs.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_mixed_strong_bcs.py:62: in poisson_mixed return sqrt(assemble(dot(u - f, u - f) * dx)) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('b3ee53611d94248501f3432962e7e053', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 2, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 2, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/af/2032be907cac2e532bc667753d24a9.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 412, in vecscatter with d.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('1acb369b3672a28f19c48b759b51701d', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 2, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/4e/6dd81dd6dbc9a8914dbc34d8352423.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 289, in form_jacobian X.copy(v) File "/usr/lib/python3.6/contextlib.py", line 88, in __exit__ next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 419, in vecscatter with d.vec_wo as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________________________ test_poisson_mixed_parallel_fieldsplit _____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________ test_poisson_mixed_parallel[False] _______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_poisson_mixed_parallel[True] _______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________ test_hdiv_l2[UnitIcosahedralSphereMesh-RT-1-refinement0-0.75] _________________________________________ MeshClass = , hdiv_space = 'RT', degree = 1, refinement = (1, 4), conv_order = 0.75 @pytest.mark.parametrize(('MeshClass', 'hdiv_space', 'degree', 'refinement', 'conv_order'), [(UnitIcosahedralSphereMesh, 'RT', 1, (1, 4), 0.75), (UnitIcosahedralSphereMesh, 'BDM', 1, (1, 4), 0.8), (UnitCubedSphereMesh, 'RTCF', 1, (2, 5), 0.8), (UnitCubedSphereMesh, 'RTCF', 2, (2, 5), 1.7), (UnitCubedSphereMesh, 'RTCF', 3, (2, 5), 1.8)]) def test_hdiv_l2(MeshClass, hdiv_space, degree, refinement, conv_order): > errors = [run_hdiv_l2(MeshClass, r, hdiv_space, degree) for r in range(*refinement)] tests/regression/test_poisson_sphere.py:53: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_sphere.py:53: in errors = [run_hdiv_l2(MeshClass, r, hdiv_space, degree) for r in range(*refinement)] tests/regression/test_poisson_sphere.py:36: in run_hdiv_l2 'fieldsplit_0_ksp_max_it': 100}) firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:264: in solve self.snes.solve(None, work) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E petsc4py.PETSc.Error: error code 73 E [0] SNESSolve() line 4560 in /tmp/pip-req-build-eqqddqg6/src/snes/interface/snes.c E [0] SNESSolve_KSPONLY() line 48 in /tmp/pip-req-build-eqqddqg6/src/snes/impls/ksponly/ksponly.c E [0] KSPSolve() line 782 in /tmp/pip-req-build-eqqddqg6/src/ksp/ksp/interface/itfunc.c E [0] KSPSolve_GMRES() line 236 in /tmp/pip-req-build-eqqddqg6/src/ksp/ksp/impls/gmres/gmres.c E [0] KSPInitialResidual() line 67 in /tmp/pip-req-build-eqqddqg6/src/ksp/ksp/interface/itres.c E [0] KSP_PCApply() line 281 in /tmp/pip-req-build-eqqddqg6/include/petsc/private/kspimpl.h E [0] PCApply() line 462 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/interface/precon.c E [0] PCApply_FieldSplit_Schur() line 1148 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/impls/fieldsplit/fieldsplit.c E [0] KSPSolve() line 726 in /tmp/pip-req-build-eqqddqg6/src/ksp/ksp/interface/itfunc.c E [0] KSPSetUpOnBlocks() line 223 in /tmp/pip-req-build-eqqddqg6/src/ksp/ksp/interface/itfunc.c E [0] PCSetUpOnBlocks() line 963 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/interface/precon.c E [0] PCSetUpOnBlocks_BJacobi_Singleblock() line 625 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/impls/bjacobi/bjacobi.c E [0] KSPSetUp() line 391 in /tmp/pip-req-build-eqqddqg6/src/ksp/ksp/interface/itfunc.c E [0] PCSetUp() line 932 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/interface/precon.c E [0] PCSetUp_ILU() line 134 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/impls/factor/ilu/ilu.c E [0] MatGetOrdering() line 180 in /tmp/pip-req-build-eqqddqg6/src/mat/order/sorder.c E [0] Object is in wrong state E [0] Not for unassembled matrix PETSc/SNES.pyx:555: Error ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('486a8d283cebd3c32d7f7a46f1a0d9ca', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 3, None),), False, 1, , Access('READ'), (, dtype('int32'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 2, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/0b/58480b92cc6e183112481cd5cc5c0b.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 412, in vecscatter with d.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('75e05c88accbe1b0be9cf35264cddfeb', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 1, None), (, 3, None)), False, 0, 1, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 3, None),), False, 2, , Access('READ'), (, dtype('int32'), (, (1,), (,))), ((, 1, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/32/a86bded93f48ff7f2efb264181116f.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 295, in form_jacobian ctx._jac.force_evaluation() File "/home/simone/firedrake/src/firedrake/firedrake/matrix.py", line 138, in force_evaluation self._M._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________ test_hdiv_l2[UnitIcosahedralSphereMesh-BDM-1-refinement1-0.8] _________________________________________ MeshClass = , hdiv_space = 'BDM', degree = 1, refinement = (1, 4), conv_order = 0.8 @pytest.mark.parametrize(('MeshClass', 'hdiv_space', 'degree', 'refinement', 'conv_order'), [(UnitIcosahedralSphereMesh, 'RT', 1, (1, 4), 0.75), (UnitIcosahedralSphereMesh, 'BDM', 1, (1, 4), 0.8), (UnitCubedSphereMesh, 'RTCF', 1, (2, 5), 0.8), (UnitCubedSphereMesh, 'RTCF', 2, (2, 5), 1.7), (UnitCubedSphereMesh, 'RTCF', 3, (2, 5), 1.8)]) def test_hdiv_l2(MeshClass, hdiv_space, degree, refinement, conv_order): > errors = [run_hdiv_l2(MeshClass, r, hdiv_space, degree) for r in range(*refinement)] tests/regression/test_poisson_sphere.py:53: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_sphere.py:53: in errors = [run_hdiv_l2(MeshClass, r, hdiv_space, degree) for r in range(*refinement)] tests/regression/test_poisson_sphere.py:36: in run_hdiv_l2 'fieldsplit_0_ksp_max_it': 100}) firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('eebd8f7985ce99fbecab9a29917ecb5a', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 3, None),), False, 1, , Access('READ'), (, dtype('int32'), (, (1,), (,))), ((, 1, None),), False, 2, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 2, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 2, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/e2/0289c48422531151462ba0ea9dc79c.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 412, in vecscatter with d.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('7ce086cd8ef57cc6591b630aca68bae5', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 3, None),), False, 1, , Access('READ'), (, dtype('int32'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 2, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/0e/850f3e2a6eadd4728aa4b8dc311b92.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 289, in form_jacobian X.copy(v) File "/usr/lib/python3.6/contextlib.py", line 88, in __exit__ next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 419, in vecscatter with d.vec_wo as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ___________________________________________ test_hdiv_l2[UnitCubedSphereMesh-RTCF-1-refinement2-0.8] ____________________________________________ MeshClass = , hdiv_space = 'RTCF', degree = 1, refinement = (2, 5), conv_order = 0.8 @pytest.mark.parametrize(('MeshClass', 'hdiv_space', 'degree', 'refinement', 'conv_order'), [(UnitIcosahedralSphereMesh, 'RT', 1, (1, 4), 0.75), (UnitIcosahedralSphereMesh, 'BDM', 1, (1, 4), 0.8), (UnitCubedSphereMesh, 'RTCF', 1, (2, 5), 0.8), (UnitCubedSphereMesh, 'RTCF', 2, (2, 5), 1.7), (UnitCubedSphereMesh, 'RTCF', 3, (2, 5), 1.8)]) def test_hdiv_l2(MeshClass, hdiv_space, degree, refinement, conv_order): > errors = [run_hdiv_l2(MeshClass, r, hdiv_space, degree) for r in range(*refinement)] tests/regression/test_poisson_sphere.py:53: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_sphere.py:53: in errors = [run_hdiv_l2(MeshClass, r, hdiv_space, degree) for r in range(*refinement)] tests/regression/test_poisson_sphere.py:36: in run_hdiv_l2 'fieldsplit_0_ksp_max_it': 100}) firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:264: in solve self.snes.solve(None, work) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E petsc4py.PETSc.Error: error code 73 E [0] SNESSolve() line 4560 in /tmp/pip-req-build-eqqddqg6/src/snes/interface/snes.c E [0] SNESSolve_KSPONLY() line 48 in /tmp/pip-req-build-eqqddqg6/src/snes/impls/ksponly/ksponly.c E [0] KSPSolve() line 782 in /tmp/pip-req-build-eqqddqg6/src/ksp/ksp/interface/itfunc.c E [0] KSPSolve_GMRES() line 236 in /tmp/pip-req-build-eqqddqg6/src/ksp/ksp/impls/gmres/gmres.c E [0] KSPInitialResidual() line 67 in /tmp/pip-req-build-eqqddqg6/src/ksp/ksp/interface/itres.c E [0] KSP_PCApply() line 281 in /tmp/pip-req-build-eqqddqg6/include/petsc/private/kspimpl.h E [0] PCApply() line 462 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/interface/precon.c E [0] PCApply_FieldSplit_Schur() line 1148 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/impls/fieldsplit/fieldsplit.c E [0] KSPSolve() line 726 in /tmp/pip-req-build-eqqddqg6/src/ksp/ksp/interface/itfunc.c E [0] KSPSetUpOnBlocks() line 223 in /tmp/pip-req-build-eqqddqg6/src/ksp/ksp/interface/itfunc.c E [0] PCSetUpOnBlocks() line 963 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/interface/precon.c E [0] PCSetUpOnBlocks_BJacobi_Singleblock() line 625 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/impls/bjacobi/bjacobi.c E [0] KSPSetUp() line 391 in /tmp/pip-req-build-eqqddqg6/src/ksp/ksp/interface/itfunc.c E [0] PCSetUp() line 932 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/interface/precon.c E [0] PCSetUp_ILU() line 134 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/impls/factor/ilu/ilu.c E [0] MatGetOrdering() line 180 in /tmp/pip-req-build-eqqddqg6/src/mat/order/sorder.c E [0] Object is in wrong state E [0] Not for unassembled matrix PETSc/SNES.pyx:555: Error ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('e4b619bec84ffafb50a5cbaff0ee0a9b', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 1, , Access('READ'), (, dtype('int32'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 2, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/af/654594e0c905285efa395b81f0bb6d.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 412, in vecscatter with d.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('4e0048320eb4d8101c456c4970a690e8', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 1, None), (, 4, None)), False, 0, 1, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 2, , Access('READ'), (, dtype('int32'), (, (1,), (,))), ((, 1, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/95/342c90f4b3cb329108bd92488d5d61.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 295, in form_jacobian ctx._jac.force_evaluation() File "/home/simone/firedrake/src/firedrake/firedrake/matrix.py", line 138, in force_evaluation self._M._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ___________________________________________ test_hdiv_l2[UnitCubedSphereMesh-RTCF-2-refinement3-1.7] ____________________________________________ MeshClass = , hdiv_space = 'RTCF', degree = 2, refinement = (2, 5), conv_order = 1.7 @pytest.mark.parametrize(('MeshClass', 'hdiv_space', 'degree', 'refinement', 'conv_order'), [(UnitIcosahedralSphereMesh, 'RT', 1, (1, 4), 0.75), (UnitIcosahedralSphereMesh, 'BDM', 1, (1, 4), 0.8), (UnitCubedSphereMesh, 'RTCF', 1, (2, 5), 0.8), (UnitCubedSphereMesh, 'RTCF', 2, (2, 5), 1.7), (UnitCubedSphereMesh, 'RTCF', 3, (2, 5), 1.8)]) def test_hdiv_l2(MeshClass, hdiv_space, degree, refinement, conv_order): > errors = [run_hdiv_l2(MeshClass, r, hdiv_space, degree) for r in range(*refinement)] tests/regression/test_poisson_sphere.py:53: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_sphere.py:53: in errors = [run_hdiv_l2(MeshClass, r, hdiv_space, degree) for r in range(*refinement)] tests/regression/test_poisson_sphere.py:36: in run_hdiv_l2 'fieldsplit_0_ksp_max_it': 100}) firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('cf0f060f7da69d6b646bb74311a5b049', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/6e/3554cbcdc3a1205cf001f4dcbede97.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 412, in vecscatter with d.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('9e62e02739d5767517a44041578b4157', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 1, , Access('READ'), (, dtype('int32'), (, (1,), (,))), ((, 1, None),), False, 2, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 12, None),), False, 3, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/4e/4d34a912dd279bac22e135f0f6e9ad.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 289, in form_jacobian X.copy(v) File "/usr/lib/python3.6/contextlib.py", line 88, in __exit__ next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 419, in vecscatter with d.vec_wo as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ___________________________________________ test_hdiv_l2[UnitCubedSphereMesh-RTCF-3-refinement4-1.8] ____________________________________________ MeshClass = , hdiv_space = 'RTCF', degree = 3, refinement = (2, 5), conv_order = 1.8 @pytest.mark.parametrize(('MeshClass', 'hdiv_space', 'degree', 'refinement', 'conv_order'), [(UnitIcosahedralSphereMesh, 'RT', 1, (1, 4), 0.75), (UnitIcosahedralSphereMesh, 'BDM', 1, (1, 4), 0.8), (UnitCubedSphereMesh, 'RTCF', 1, (2, 5), 0.8), (UnitCubedSphereMesh, 'RTCF', 2, (2, 5), 1.7), (UnitCubedSphereMesh, 'RTCF', 3, (2, 5), 1.8)]) def test_hdiv_l2(MeshClass, hdiv_space, degree, refinement, conv_order): > errors = [run_hdiv_l2(MeshClass, r, hdiv_space, degree) for r in range(*refinement)] tests/regression/test_poisson_sphere.py:53: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_sphere.py:53: in errors = [run_hdiv_l2(MeshClass, r, hdiv_space, degree) for r in range(*refinement)] tests/regression/test_poisson_sphere.py:36: in run_hdiv_l2 'fieldsplit_0_ksp_max_it': 100}) firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('eab444d42918cd70582ff4dafd26cf1d', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 9, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/9b/fed799e56b64e0fd69057898c34805.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 412, in vecscatter with d.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('ec5d5d9aa1c895428ade6fc87e9fa647', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 9, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (3,), (,))), ((, 4, None),), False, 1, , Access('READ'), (, dtype('int32'), (, (1,), (,))), ((, 1, None),), False, 2, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 9, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 24, None),), False, 3, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 9, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/8e/0d48856e27559262a76e87982c9807.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 289, in form_jacobian X.copy(v) File "/usr/lib/python3.6/contextlib.py", line 88, in __exit__ next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 419, in vecscatter with d.vec_wo as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _______________________________________________________ test_hdiv_l2_cubedsphere_parallel _______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________ test_poisson_analytic[params0-1-False] _____________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10415'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d6878d2f0> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('9b0a8458e044ba4991cd5da6b55e8b7d', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('9b0a8458e044ba4991cd5da6b55e8b7d', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/c2/ae43dc8a7aa6269af9c46d7772016f.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/c2/ae43dc8a7aa6269af9c46d7772016f.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: params = {}, degree = 1, quadrilateral = False @pytest.mark.parametrize(['params', 'degree', 'quadrilateral'], [(p, d, q) for p in [{}, {'snes_type': 'ksponly', 'ksp_type': 'preonly', 'pc_type': 'lu'}] for d in (1, 2) for q in [False, True]]) def test_poisson_analytic(params, degree, quadrilateral): > assert (run_test(2, degree, parameters=params, quadrilateral=quadrilateral) < 1.e-9) tests/regression/test_poisson_strong_bcs.py:75: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_strong_bcs.py:41: in run_test return sqrt(assemble(dot(u - f, u - f) * dx)) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________________ test_poisson_analytic[params1-1-True] _____________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...dinates'), Map(Set((16, 16, 16), 'Cells'), Set((25, 25, 25), 'set_10419'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3dcf41dd08> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('79355a526193a6362630595329122853', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('79355a526193a6362630595329122853', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/b5/fce26c8735dbd87eb2ee600a5cb513.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/b5/fce26c8735dbd87eb2ee600a5cb513.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: params = {}, degree = 1, quadrilateral = True @pytest.mark.parametrize(['params', 'degree', 'quadrilateral'], [(p, d, q) for p in [{}, {'snes_type': 'ksponly', 'ksp_type': 'preonly', 'pc_type': 'lu'}] for d in (1, 2) for q in [False, True]]) def test_poisson_analytic(params, degree, quadrilateral): > assert (run_test(2, degree, parameters=params, quadrilateral=quadrilateral) < 1.e-9) tests/regression/test_poisson_strong_bcs.py:75: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_strong_bcs.py:41: in run_test return sqrt(assemble(dot(u - f, u - f) * dx)) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________ test_poisson_analytic[params2-2-False] _____________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10423'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d99a9a6a8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('d6b3d95993143ff77ecb39b19a0dc597', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('d6b3d95993143ff77ecb39b19a0dc597', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/94/eb3a86c0b72e24e478d5712d97fde7.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/94/eb3a86c0b72e24e478d5712d97fde7.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: params = {}, degree = 2, quadrilateral = False @pytest.mark.parametrize(['params', 'degree', 'quadrilateral'], [(p, d, q) for p in [{}, {'snes_type': 'ksponly', 'ksp_type': 'preonly', 'pc_type': 'lu'}] for d in (1, 2) for q in [False, True]]) def test_poisson_analytic(params, degree, quadrilateral): > assert (run_test(2, degree, parameters=params, quadrilateral=quadrilateral) < 1.e-9) tests/regression/test_poisson_strong_bcs.py:75: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_strong_bcs.py:41: in run_test return sqrt(assemble(dot(u - f, u - f) * dx)) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________________ test_poisson_analytic[params3-2-True] _____________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...dinates'), Map(Set((16, 16, 16), 'Cells'), Set((25, 25, 25), 'set_10428'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d9b403378> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('5b1b79fcf1a0f8a648d717c34ed3d646', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('5b1b79fcf1a0f8a648d717c34ed3d646', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 9, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/ab/b48319a528dc8e8fce2f38a1305ace.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/ab/b48319a528dc8e8fce2f38a1305ace.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: params = {}, degree = 2, quadrilateral = True @pytest.mark.parametrize(['params', 'degree', 'quadrilateral'], [(p, d, q) for p in [{}, {'snes_type': 'ksponly', 'ksp_type': 'preonly', 'pc_type': 'lu'}] for d in (1, 2) for q in [False, True]]) def test_poisson_analytic(params, degree, quadrilateral): > assert (run_test(2, degree, parameters=params, quadrilateral=quadrilateral) < 1.e-9) tests/regression/test_poisson_strong_bcs.py:75: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_strong_bcs.py:41: in run_test return sqrt(assemble(dot(u - f, u - f) * dx)) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('d22777ffbbb6906110312d7bc76bef1f', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 9, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 9, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/f9/0e7f0e3298068641ba93a18115bfe7.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________________________ test_poisson_analytic[params4-1-False] _____________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10433'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d5de3fc80> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('9b0a8458e044ba4991cd5da6b55e8b7d', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('9b0a8458e044ba4991cd5da6b55e8b7d', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/c2/ae43dc8a7aa6269af9c46d7772016f.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/c2/ae43dc8a7aa6269af9c46d7772016f.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: params = {'ksp_type': 'preonly', 'pc_type': 'lu', 'snes_type': 'ksponly'}, degree = 1, quadrilateral = False @pytest.mark.parametrize(['params', 'degree', 'quadrilateral'], [(p, d, q) for p in [{}, {'snes_type': 'ksponly', 'ksp_type': 'preonly', 'pc_type': 'lu'}] for d in (1, 2) for q in [False, True]]) def test_poisson_analytic(params, degree, quadrilateral): > assert (run_test(2, degree, parameters=params, quadrilateral=quadrilateral) < 1.e-9) tests/regression/test_poisson_strong_bcs.py:75: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_strong_bcs.py:41: in run_test return sqrt(assemble(dot(u - f, u - f) * dx)) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________________ test_poisson_analytic[params5-1-True] _____________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...dinates'), Map(Set((16, 16, 16), 'Cells'), Set((25, 25, 25), 'set_10437'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3dbb6be6a8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('79355a526193a6362630595329122853', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('79355a526193a6362630595329122853', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/b5/fce26c8735dbd87eb2ee600a5cb513.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/b5/fce26c8735dbd87eb2ee600a5cb513.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: params = {'ksp_type': 'preonly', 'pc_type': 'lu', 'snes_type': 'ksponly'}, degree = 1, quadrilateral = True @pytest.mark.parametrize(['params', 'degree', 'quadrilateral'], [(p, d, q) for p in [{}, {'snes_type': 'ksponly', 'ksp_type': 'preonly', 'pc_type': 'lu'}] for d in (1, 2) for q in [False, True]]) def test_poisson_analytic(params, degree, quadrilateral): > assert (run_test(2, degree, parameters=params, quadrilateral=quadrilateral) < 1.e-9) tests/regression/test_poisson_strong_bcs.py:75: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_strong_bcs.py:41: in run_test return sqrt(assemble(dot(u - f, u - f) * dx)) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________ test_poisson_analytic[params6-2-False] _____________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10441'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d99a9a7b8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('d6b3d95993143ff77ecb39b19a0dc597', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('d6b3d95993143ff77ecb39b19a0dc597', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/94/eb3a86c0b72e24e478d5712d97fde7.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/94/eb3a86c0b72e24e478d5712d97fde7.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: params = {'ksp_type': 'preonly', 'pc_type': 'lu', 'snes_type': 'ksponly'}, degree = 2, quadrilateral = False @pytest.mark.parametrize(['params', 'degree', 'quadrilateral'], [(p, d, q) for p in [{}, {'snes_type': 'ksponly', 'ksp_type': 'preonly', 'pc_type': 'lu'}] for d in (1, 2) for q in [False, True]]) def test_poisson_analytic(params, degree, quadrilateral): > assert (run_test(2, degree, parameters=params, quadrilateral=quadrilateral) < 1.e-9) tests/regression/test_poisson_strong_bcs.py:75: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_strong_bcs.py:41: in run_test return sqrt(assemble(dot(u - f, u - f) * dx)) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________________ test_poisson_analytic[params7-2-True] _____________________________________________________ params = {'ksp_type': 'preonly', 'pc_type': 'lu', 'snes_type': 'ksponly'}, degree = 2, quadrilateral = True @pytest.mark.parametrize(['params', 'degree', 'quadrilateral'], [(p, d, q) for p in [{}, {'snes_type': 'ksponly', 'ksp_type': 'preonly', 'pc_type': 'lu'}] for d in (1, 2) for q in [False, True]]) def test_poisson_analytic(params, degree, quadrilateral): > assert (run_test(2, degree, parameters=params, quadrilateral=quadrilateral) < 1.e-9) tests/regression/test_poisson_strong_bcs.py:75: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_strong_bcs.py:36: in run_test solve(a == 0, u, solver_parameters=parameters, bcs=bcs) firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:169: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('d22777ffbbb6906110312d7bc76bef1f', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 9, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 9, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/f9/0e7f0e3298068641ba93a18115bfe7.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('f24674df793386f8c72c697b68210e82', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 9, None), (, 9, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/f5/95bb74ccf1ac17a458eb28f6862148.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 295, in form_jacobian ctx._jac.force_evaluation() File "/home/simone/firedrake/src/firedrake/firedrake/matrix.py", line 138, in force_evaluation self._M._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________________ test_poisson_analytic_linear[params0-1-False] _________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10451'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d514f29d8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('9b0a8458e044ba4991cd5da6b55e8b7d', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('9b0a8458e044ba4991cd5da6b55e8b7d', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/c2/ae43dc8a7aa6269af9c46d7772016f.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/c2/ae43dc8a7aa6269af9c46d7772016f.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: params = {}, degree = 1, quadrilateral = False @pytest.mark.parametrize(['params', 'degree', 'quadrilateral'], [(p, d, q) for p in [{}, {'snes_type': 'ksponly', 'ksp_type': 'preonly', 'pc_type': 'lu'}] for d in (1, 2) for q in [False, True]]) def test_poisson_analytic_linear(params, degree, quadrilateral): > assert (run_test_linear(2, degree, parameters=params, quadrilateral=quadrilateral) < 5.e-6) tests/regression/test_poisson_strong_bcs.py:84: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_strong_bcs.py:66: in run_test_linear return sqrt(assemble(dot(u - f, u - f) * dx)) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________ test_poisson_analytic_linear[params1-1-True] __________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...dinates'), Map(Set((16, 16, 16), 'Cells'), Set((25, 25, 25), 'set_10455'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d60e7ad90> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('79355a526193a6362630595329122853', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('79355a526193a6362630595329122853', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/b5/fce26c8735dbd87eb2ee600a5cb513.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/b5/fce26c8735dbd87eb2ee600a5cb513.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: params = {}, degree = 1, quadrilateral = True @pytest.mark.parametrize(['params', 'degree', 'quadrilateral'], [(p, d, q) for p in [{}, {'snes_type': 'ksponly', 'ksp_type': 'preonly', 'pc_type': 'lu'}] for d in (1, 2) for q in [False, True]]) def test_poisson_analytic_linear(params, degree, quadrilateral): > assert (run_test_linear(2, degree, parameters=params, quadrilateral=quadrilateral) < 5.e-6) tests/regression/test_poisson_strong_bcs.py:84: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_strong_bcs.py:66: in run_test_linear return sqrt(assemble(dot(u - f, u - f) * dx)) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('21d88d77a07c9fcbe9183be727cf0b61', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/fd/b3cc89270a1bd76c2d2c9c108512af.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________________ test_poisson_analytic_linear[params2-2-False] _________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10459'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3e187ad0d0> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('d6b3d95993143ff77ecb39b19a0dc597', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('d6b3d95993143ff77ecb39b19a0dc597', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/94/eb3a86c0b72e24e478d5712d97fde7.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/94/eb3a86c0b72e24e478d5712d97fde7.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: params = {}, degree = 2, quadrilateral = False @pytest.mark.parametrize(['params', 'degree', 'quadrilateral'], [(p, d, q) for p in [{}, {'snes_type': 'ksponly', 'ksp_type': 'preonly', 'pc_type': 'lu'}] for d in (1, 2) for q in [False, True]]) def test_poisson_analytic_linear(params, degree, quadrilateral): > assert (run_test_linear(2, degree, parameters=params, quadrilateral=quadrilateral) < 5.e-6) tests/regression/test_poisson_strong_bcs.py:84: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_strong_bcs.py:66: in run_test_linear return sqrt(assemble(dot(u - f, u - f) * dx)) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('4169ede008f9ae7197b5b1c6946371af', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/e7/8d12f63534ec89d18fdb058b9736b9.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________________ test_poisson_analytic_linear[params3-2-True] __________________________________________________ params = {}, degree = 2, quadrilateral = True @pytest.mark.parametrize(['params', 'degree', 'quadrilateral'], [(p, d, q) for p in [{}, {'snes_type': 'ksponly', 'ksp_type': 'preonly', 'pc_type': 'lu'}] for d in (1, 2) for q in [False, True]]) def test_poisson_analytic_linear(params, degree, quadrilateral): > assert (run_test_linear(2, degree, parameters=params, quadrilateral=quadrilateral) < 5.e-6) tests/regression/test_poisson_strong_bcs.py:84: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_strong_bcs.py:61: in run_test_linear solve(a == L, u, solver_parameters=parameters, bcs=bcs) firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('38b94055f024d2b3c11175518f45105c', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 9, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 9, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/94/f48086749e69ff29d736b3247668da.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('f24674df793386f8c72c697b68210e82', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 9, None), (, 9, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/f5/95bb74ccf1ac17a458eb28f6862148.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 295, in form_jacobian ctx._jac.force_evaluation() File "/home/simone/firedrake/src/firedrake/firedrake/matrix.py", line 138, in force_evaluation self._M._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________________ test_poisson_analytic_linear[params4-1-False] _________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10469'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3e42a4db70> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('9b0a8458e044ba4991cd5da6b55e8b7d', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('9b0a8458e044ba4991cd5da6b55e8b7d', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/c2/ae43dc8a7aa6269af9c46d7772016f.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/c2/ae43dc8a7aa6269af9c46d7772016f.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: params = {'ksp_type': 'preonly', 'pc_type': 'lu', 'snes_type': 'ksponly'}, degree = 1, quadrilateral = False @pytest.mark.parametrize(['params', 'degree', 'quadrilateral'], [(p, d, q) for p in [{}, {'snes_type': 'ksponly', 'ksp_type': 'preonly', 'pc_type': 'lu'}] for d in (1, 2) for q in [False, True]]) def test_poisson_analytic_linear(params, degree, quadrilateral): > assert (run_test_linear(2, degree, parameters=params, quadrilateral=quadrilateral) < 5.e-6) tests/regression/test_poisson_strong_bcs.py:84: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_strong_bcs.py:66: in run_test_linear return sqrt(assemble(dot(u - f, u - f) * dx)) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________ test_poisson_analytic_linear[params5-1-True] __________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...dinates'), Map(Set((16, 16, 16), 'Cells'), Set((25, 25, 25), 'set_10473'), 4, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d6874a9d8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('79355a526193a6362630595329122853', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('79355a526193a6362630595329122853', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/b5/fce26c8735dbd87eb2ee600a5cb513.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/b5/fce26c8735dbd87eb2ee600a5cb513.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: params = {'ksp_type': 'preonly', 'pc_type': 'lu', 'snes_type': 'ksponly'}, degree = 1, quadrilateral = True @pytest.mark.parametrize(['params', 'degree', 'quadrilateral'], [(p, d, q) for p in [{}, {'snes_type': 'ksponly', 'ksp_type': 'preonly', 'pc_type': 'lu'}] for d in (1, 2) for q in [False, True]]) def test_poisson_analytic_linear(params, degree, quadrilateral): > assert (run_test_linear(2, degree, parameters=params, quadrilateral=quadrilateral) < 5.e-6) tests/regression/test_poisson_strong_bcs.py:84: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_strong_bcs.py:66: in run_test_linear return sqrt(assemble(dot(u - f, u - f) * dx)) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('21d88d77a07c9fcbe9183be727cf0b61', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 4, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/fd/b3cc89270a1bd76c2d2c9c108512af.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________________ test_poisson_analytic_linear[params6-2-False] _________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10477'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d6817b510> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('d6b3d95993143ff77ecb39b19a0dc597', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('d6b3d95993143ff77ecb39b19a0dc597', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/94/eb3a86c0b72e24e478d5712d97fde7.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/94/eb3a86c0b72e24e478d5712d97fde7.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: params = {'ksp_type': 'preonly', 'pc_type': 'lu', 'snes_type': 'ksponly'}, degree = 2, quadrilateral = False @pytest.mark.parametrize(['params', 'degree', 'quadrilateral'], [(p, d, q) for p in [{}, {'snes_type': 'ksponly', 'ksp_type': 'preonly', 'pc_type': 'lu'}] for d in (1, 2) for q in [False, True]]) def test_poisson_analytic_linear(params, degree, quadrilateral): > assert (run_test_linear(2, degree, parameters=params, quadrilateral=quadrilateral) < 5.e-6) tests/regression/test_poisson_strong_bcs.py:84: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_strong_bcs.py:66: in run_test_linear return sqrt(assemble(dot(u - f, u - f) * dx)) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('4169ede008f9ae7197b5b1c6946371af', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/e7/8d12f63534ec89d18fdb058b9736b9.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________________ test_poisson_analytic_linear[params7-2-True] __________________________________________________ params = {'ksp_type': 'preonly', 'pc_type': 'lu', 'snes_type': 'ksponly'}, degree = 2, quadrilateral = True @pytest.mark.parametrize(['params', 'degree', 'quadrilateral'], [(p, d, q) for p in [{}, {'snes_type': 'ksponly', 'ksp_type': 'preonly', 'pc_type': 'lu'}] for d in (1, 2) for q in [False, True]]) def test_poisson_analytic_linear(params, degree, quadrilateral): > assert (run_test_linear(2, degree, parameters=params, quadrilateral=quadrilateral) < 5.e-6) tests/regression/test_poisson_strong_bcs.py:84: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_strong_bcs.py:61: in run_test_linear solve(a == L, u, solver_parameters=parameters, bcs=bcs) firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('38b94055f024d2b3c11175518f45105c', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 9, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, , Access('READ'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 9, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/94/f48086749e69ff29d736b3247668da.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('f24674df793386f8c72c697b68210e82', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 9, None), (, 9, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/f5/95bb74ccf1ac17a458eb28f6862148.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 295, in form_jacobian ctx._jac.force_evaluation() File "/home/simone/firedrake/src/firedrake/firedrake/matrix.py", line 138, in force_evaluation self._M._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________________________ test_poisson_analytic_linear_parallel _____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________________ test_poisson_nitsche[1-False] _________________________________________________________ degree = 1, quadrilateral = False @pytest.mark.parametrize('quadrilateral', [False, True]) @pytest.mark.parametrize('degree', (1, 2)) def test_poisson_nitsche(degree, quadrilateral): > assert run_test(2, degree, quadrilateral=quadrilateral) < 1e-3 tests/regression/test_poisson_strong_bcs_nitsche.py:86: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_strong_bcs_nitsche.py:75: in run_test solve(B == F, u) firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:264: in solve self.snes.solve(None, work) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E petsc4py.PETSc.Error: error code 73 E [0] SNESSolve() line 4560 in /tmp/pip-req-build-eqqddqg6/src/snes/interface/snes.c E [0] SNESSolve_KSPONLY() line 48 in /tmp/pip-req-build-eqqddqg6/src/snes/impls/ksponly/ksponly.c E [0] KSPSolve() line 725 in /tmp/pip-req-build-eqqddqg6/src/ksp/ksp/interface/itfunc.c E [0] KSPSetUp() line 391 in /tmp/pip-req-build-eqqddqg6/src/ksp/ksp/interface/itfunc.c E [0] PCSetUp() line 932 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/interface/precon.c E [0] PCSetUp_ILU() line 134 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/impls/factor/ilu/ilu.c E [0] MatGetOrdering() line 180 in /tmp/pip-req-build-eqqddqg6/src/mat/order/sorder.c E [0] Object is in wrong state E [0] Not for unassembled matrix PETSc/SNES.pyx:555: Error ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('19b964817c52b43148b9c1fdec938a88', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), None, False, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/e9/9c823cfc5f367eb835c9cbd1a12364.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('921c9df3d45cda875065bb5f72be2bf6', , False, False, True, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 3, None), (, 3, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('uint32'), (, (1,), (,))), None, False, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/cf/4027381586cc8ce6a94ec231e90e7d.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 295, in form_jacobian ctx._jac.force_evaluation() File "/home/simone/firedrake/src/firedrake/firedrake/matrix.py", line 138, in force_evaluation self._M._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________________________ test_poisson_nitsche[1-True] __________________________________________________________ degree = 1, quadrilateral = True @pytest.mark.parametrize('quadrilateral', [False, True]) @pytest.mark.parametrize('degree', (1, 2)) def test_poisson_nitsche(degree, quadrilateral): > assert run_test(2, degree, quadrilateral=quadrilateral) < 1e-3 tests/regression/test_poisson_strong_bcs_nitsche.py:86: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_strong_bcs_nitsche.py:75: in run_test solve(B == F, u) firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:264: in solve self.snes.solve(None, work) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E petsc4py.PETSc.Error: error code 73 E [0] SNESSolve() line 4560 in /tmp/pip-req-build-eqqddqg6/src/snes/interface/snes.c E [0] SNESSolve_KSPONLY() line 48 in /tmp/pip-req-build-eqqddqg6/src/snes/impls/ksponly/ksponly.c E [0] KSPSolve() line 725 in /tmp/pip-req-build-eqqddqg6/src/ksp/ksp/interface/itfunc.c E [0] KSPSetUp() line 391 in /tmp/pip-req-build-eqqddqg6/src/ksp/ksp/interface/itfunc.c E [0] PCSetUp() line 932 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/interface/precon.c E [0] PCSetUp_ILU() line 134 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/impls/factor/ilu/ilu.c E [0] MatGetOrdering() line 180 in /tmp/pip-req-build-eqqddqg6/src/mat/order/sorder.c E [0] Object is in wrong state E [0] Not for unassembled matrix PETSc/SNES.pyx:555: Error ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('19b964817c52b43148b9c1fdec938a88', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), None, False, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/e9/9c823cfc5f367eb835c9cbd1a12364.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('303c2321f329b160778ccde845abc686', , False, False, True, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 4, None), (, 4, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 0, , Access('READ'), (, dtype('uint32'), (, (1,), (,))), None, False, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/cf/ee4d92a71b63d59d896ecb4517a6b6.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 295, in form_jacobian ctx._jac.force_evaluation() File "/home/simone/firedrake/src/firedrake/firedrake/matrix.py", line 138, in force_evaluation self._M._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________________________ test_poisson_nitsche[2-False] _________________________________________________________ degree = 2, quadrilateral = False @pytest.mark.parametrize('quadrilateral', [False, True]) @pytest.mark.parametrize('degree', (1, 2)) def test_poisson_nitsche(degree, quadrilateral): > assert run_test(2, degree, quadrilateral=quadrilateral) < 1e-3 tests/regression/test_poisson_strong_bcs_nitsche.py:86: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_strong_bcs_nitsche.py:75: in run_test solve(B == F, u) firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:264: in solve self.snes.solve(None, work) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E petsc4py.PETSc.Error: error code 73 E [0] SNESSolve() line 4560 in /tmp/pip-req-build-eqqddqg6/src/snes/interface/snes.c E [0] SNESSolve_KSPONLY() line 48 in /tmp/pip-req-build-eqqddqg6/src/snes/impls/ksponly/ksponly.c E [0] KSPSolve() line 725 in /tmp/pip-req-build-eqqddqg6/src/ksp/ksp/interface/itfunc.c E [0] KSPSetUp() line 391 in /tmp/pip-req-build-eqqddqg6/src/ksp/ksp/interface/itfunc.c E [0] PCSetUp() line 932 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/interface/precon.c E [0] PCSetUp_ILU() line 134 in /tmp/pip-req-build-eqqddqg6/src/ksp/pc/impls/factor/ilu/ilu.c E [0] MatGetOrdering() line 180 in /tmp/pip-req-build-eqqddqg6/src/mat/order/sorder.c E [0] Object is in wrong state E [0] Not for unassembled matrix PETSc/SNES.pyx:555: Error ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('19b964817c52b43148b9c1fdec938a88', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), None, False, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/e9/9c823cfc5f367eb835c9cbd1a12364.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('336878846e615443757050131843187b', , False, False, True, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 6, None), (, 6, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, , Access('READ'), (, dtype('uint32'), (, (1,), (,))), None, False, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/c9/68b0e520270007fdb8d2ff2ffc4af0.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 295, in form_jacobian ctx._jac.force_evaluation() File "/home/simone/firedrake/src/firedrake/firedrake/matrix.py", line 138, in force_evaluation self._M._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________________________ test_poisson_nitsche[2-True] __________________________________________________________ degree = 2, quadrilateral = True @pytest.mark.parametrize('quadrilateral', [False, True]) @pytest.mark.parametrize('degree', (1, 2)) def test_poisson_nitsche(degree, quadrilateral): > assert run_test(2, degree, quadrilateral=quadrilateral) < 1e-3 tests/regression/test_poisson_strong_bcs_nitsche.py:86: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_poisson_strong_bcs_nitsche.py:75: in run_test solve(B == F, u) firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('19b964817c52b43148b9c1fdec938a88', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), None, False, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/e9/9c823cfc5f367eb835c9cbd1a12364.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('f24674df793386f8c72c697b68210e82', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 9, None), (, 9, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 4, None),), False, 1, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/f5/95bb74ccf1ac17a458eb28f6862148.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 295, in form_jacobian ctx._jac.force_evaluation() File "/home/simone/firedrake/src/firedrake/firedrake/matrix.py", line 138, in force_evaluation self._M._force_evaluation() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________________________________________ test_convergence[1-CG-1.8] ___________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10505'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3dcf4898c8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('2fe12e6f778a04660f8175d2578dfa10', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('2fe12e6f778a04660f8175d2578dfa10', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/47/1e8e2fdc38a2c7cd036fc6ed237fa6.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/47/1e8e2fdc38a2c7cd036fc6ed237fa6.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 1, family = 'CG', expected_convergence = 1.8 @pytest.mark.parametrize(('degree', 'family', 'expected_convergence'), [ (1, 'CG', 1.8), (2, 'CG', 2.6), (3, 'CG', 3.8), (0, 'DG', 0.8), (1, 'DG', 1.8), (2, 'DG', 2.8)]) def test_convergence(degree, family, expected_convergence): > l2_diff = np.array([run_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:82: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_projection.py:82: in l2_diff = np.array([run_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:69: in run_test ret.project(e, solver_parameters={'ksp_type': 'preonly', 'pc_type': 'lu'}) firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/linear_solver.py:157: in solve with self.inserted_options(), b.dat.vec_ro as rhs, acc as solution: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_convergence[2-CG-2.6] ___________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10510'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d9c4309d8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('650d8f06ca48cb95a6270745120ad54c', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('650d8f06ca48cb95a6270745120ad54c', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/5a/e43120a1138e12ed9b73e2ba01b986.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/5a/e43120a1138e12ed9b73e2ba01b986.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 2, family = 'CG', expected_convergence = 2.6 @pytest.mark.parametrize(('degree', 'family', 'expected_convergence'), [ (1, 'CG', 1.8), (2, 'CG', 2.6), (3, 'CG', 3.8), (0, 'DG', 0.8), (1, 'DG', 1.8), (2, 'DG', 2.8)]) def test_convergence(degree, family, expected_convergence): > l2_diff = np.array([run_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:82: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_projection.py:82: in l2_diff = np.array([run_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:69: in run_test ret.project(e, solver_parameters={'ksp_type': 'preonly', 'pc_type': 'lu'}) firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/linear_solver.py:157: in solve with self.inserted_options(), b.dat.vec_ro as rhs, acc as solution: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_convergence[3-CG-3.8] ___________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10516'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3dca699e18> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('34316fa66c04988afa95bbba49a8cef3', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('34316fa66c04988afa95bbba49a8cef3', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 10, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/7a/0ca54ab06e791738cee324a2fcc39c.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/7a/0ca54ab06e791738cee324a2fcc39c.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 3, family = 'CG', expected_convergence = 3.8 @pytest.mark.parametrize(('degree', 'family', 'expected_convergence'), [ (1, 'CG', 1.8), (2, 'CG', 2.6), (3, 'CG', 3.8), (0, 'DG', 0.8), (1, 'DG', 1.8), (2, 'DG', 2.8)]) def test_convergence(degree, family, expected_convergence): > l2_diff = np.array([run_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:82: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_projection.py:82: in l2_diff = np.array([run_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:69: in run_test ret.project(e, solver_parameters={'ksp_type': 'preonly', 'pc_type': 'lu'}) firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/linear_solver.py:157: in solve with self.inserted_options(), b.dat.vec_ro as rhs, acc as solution: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_convergence[0-DG-0.8] ___________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10522'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d6874a7b8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('7dd1dfb6812f4b1e5757d19a908d9576', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('7dd1dfb6812f4b1e5757d19a908d9576', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 1, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/e7/9dc4b9fd34c4d160d4097e08a2f29d.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/e7/9dc4b9fd34c4d160d4097e08a2f29d.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 0, family = 'DG', expected_convergence = 0.8 @pytest.mark.parametrize(('degree', 'family', 'expected_convergence'), [ (1, 'CG', 1.8), (2, 'CG', 2.6), (3, 'CG', 3.8), (0, 'DG', 0.8), (1, 'DG', 1.8), (2, 'DG', 2.8)]) def test_convergence(degree, family, expected_convergence): > l2_diff = np.array([run_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:82: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_projection.py:82: in l2_diff = np.array([run_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:69: in run_test ret.project(e, solver_parameters={'ksp_type': 'preonly', 'pc_type': 'lu'}) firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:154: in solve with x.dat.vec_wo as x_, b.dat.vec_ro as b_: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_convergence[1-DG-1.8] ___________________________________________________________ cls = args = (Kernel(""" template static inline void subkernel0_cell_to_00_cell_integral_otherwise (const Eigen...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10528'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d514f4c80> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('13baaeac0f0c32a3b0d61f052eb8487e', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('13baaeac0f0c32a3b0d61f052eb8487e', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 3, None), (, 3, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'cpp' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/32/79109132af345a80374f5f8917b9e7.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/32/79109132af345a80374f5f8917b9e7.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 1, family = 'DG', expected_convergence = 1.8 @pytest.mark.parametrize(('degree', 'family', 'expected_convergence'), [ (1, 'CG', 1.8), (2, 'CG', 2.6), (3, 'CG', 3.8), (0, 'DG', 0.8), (1, 'DG', 1.8), (2, 'DG', 2.8)]) def test_convergence(degree, family, expected_convergence): > l2_diff = np.array([run_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:82: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_projection.py:82: in l2_diff = np.array([run_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:69: in run_test ret.project(e, solver_parameters={'ksp_type': 'preonly', 'pc_type': 'lu'}) firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:153: in solve self.A.force_evaluation() firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicxx', '-fPIC', '-Wall', '-march=native', '-O3', '-ffast-math', ...] executable = b'mpicxx', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_convergence[2-DG-2.8] ___________________________________________________________ cls = args = (Kernel(""" template static inline void subkernel0_cell_to_00_cell_integral_otherwise (const Eigen...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10534'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d9adcf400> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('9b8d95100bde13005ba2bfe215006dae', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('9b8d95100bde13005ba2bfe215006dae', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 6, None), (, 6, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'cpp' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/9b/3f825e1b259e38027df2795f6f8c0b.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/9b/3f825e1b259e38027df2795f6f8c0b.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 2, family = 'DG', expected_convergence = 2.8 @pytest.mark.parametrize(('degree', 'family', 'expected_convergence'), [ (1, 'CG', 1.8), (2, 'CG', 2.6), (3, 'CG', 3.8), (0, 'DG', 0.8), (1, 'DG', 1.8), (2, 'DG', 2.8)]) def test_convergence(degree, family, expected_convergence): > l2_diff = np.array([run_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:82: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_projection.py:82: in l2_diff = np.array([run_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:69: in run_test ret.project(e, solver_parameters={'ksp_type': 'preonly', 'pc_type': 'lu'}) firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:153: in solve self.A.force_evaluation() firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicxx', '-fPIC', '-Wall', '-march=native', '-O3', '-ffast-math', ...] executable = b'mpicxx', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_vector_convergence[1-CG-1.8] _______________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10540'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d6817ba60> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('7bf6a621f8dcdd43974cb287d10b91d6', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('7bf6a621f8dcdd43974cb287d10b91d6', , False, False, False, , Access('INC'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/f2/ecc82e2c7921a705cc4dc20b1ba40f.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/f2/ecc82e2c7921a705cc4dc20b1ba40f.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 1, family = 'CG', expected_convergence = 1.8 @pytest.mark.parametrize(('degree', 'family', 'expected_convergence'), [ (1, 'CG', 1.8), (2, 'CG', 2.6), (3, 'CG', 3.8), (0, 'DG', 0.8), (1, 'DG', 1.8), (2, 'DG', 2.8)]) def test_vector_convergence(degree, family, expected_convergence): > l2_diff = np.array([run_vector_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_projection.py:95: in l2_diff = np.array([run_vector_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:35: in run_vector_test project(expr, ret, solver_parameters={'ksp_type': 'preonly', 'pc_type': 'lu'}) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/linear_solver.py:157: in solve with self.inserted_options(), b.dat.vec_ro as rhs, acc as solution: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_vector_convergence[2-CG-2.6] _______________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10545'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d687919d8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('da33f079dfd9d4dad3df38de3a417c14', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('da33f079dfd9d4dad3df38de3a417c14', , False, False, False, , Access('INC'), (, dtype('float64'), (, (2,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/5d/3eff5791213e58d70f51cb5f0c6b1f.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/5d/3eff5791213e58d70f51cb5f0c6b1f.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 2, family = 'CG', expected_convergence = 2.6 @pytest.mark.parametrize(('degree', 'family', 'expected_convergence'), [ (1, 'CG', 1.8), (2, 'CG', 2.6), (3, 'CG', 3.8), (0, 'DG', 0.8), (1, 'DG', 1.8), (2, 'DG', 2.8)]) def test_vector_convergence(degree, family, expected_convergence): > l2_diff = np.array([run_vector_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_projection.py:95: in l2_diff = np.array([run_vector_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:35: in run_vector_test project(expr, ret, solver_parameters={'ksp_type': 'preonly', 'pc_type': 'lu'}) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/linear_solver.py:157: in solve with self.inserted_options(), b.dat.vec_ro as rhs, acc as solution: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_vector_convergence[3-CG-3.8] _______________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10551'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d5f4f17b8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('a3a47440029085d461bfe9dbf874cdc2', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('a3a47440029085d461bfe9dbf874cdc2', , False, False, False, , Access('INC'), (, dtype('float64'), (, (2,), (,))), ((, 10, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/5c/eae476084b656bd96fea5b2f12fc22.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/5c/eae476084b656bd96fea5b2f12fc22.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 3, family = 'CG', expected_convergence = 3.8 @pytest.mark.parametrize(('degree', 'family', 'expected_convergence'), [ (1, 'CG', 1.8), (2, 'CG', 2.6), (3, 'CG', 3.8), (0, 'DG', 0.8), (1, 'DG', 1.8), (2, 'DG', 2.8)]) def test_vector_convergence(degree, family, expected_convergence): > l2_diff = np.array([run_vector_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_projection.py:95: in l2_diff = np.array([run_vector_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:35: in run_vector_test project(expr, ret, solver_parameters={'ksp_type': 'preonly', 'pc_type': 'lu'}) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/linear_solver.py:157: in solve with self.inserted_options(), b.dat.vec_ro as rhs, acc as solution: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_vector_convergence[0-DG-0.8] _______________________________________________________ cls = args = (Kernel(""" template static inline void subkernel0_cell_to_00_cell_integral_otherwise (const Eigen...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10557'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3dbf1dff28> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('80169e5ecb3e0b1497fc99ef68e02c15', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('80169e5ecb3e0b1497fc99ef68e02c15', , False, False, False, , Access('INC'), (, dtype('float64'), (((2, 2),),)), ((, 1, None), (, 1, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'cpp' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/38/9a2c1944d9b578496a4bd1ae758c86.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/38/9a2c1944d9b578496a4bd1ae758c86.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 0, family = 'DG', expected_convergence = 0.8 @pytest.mark.parametrize(('degree', 'family', 'expected_convergence'), [ (1, 'CG', 1.8), (2, 'CG', 2.6), (3, 'CG', 3.8), (0, 'DG', 0.8), (1, 'DG', 1.8), (2, 'DG', 2.8)]) def test_vector_convergence(degree, family, expected_convergence): > l2_diff = np.array([run_vector_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_projection.py:95: in l2_diff = np.array([run_vector_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:35: in run_vector_test project(expr, ret, solver_parameters={'ksp_type': 'preonly', 'pc_type': 'lu'}) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:153: in solve self.A.force_evaluation() firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicxx', '-fPIC', '-Wall', '-march=native', '-O3', '-ffast-math', ...] executable = b'mpicxx', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_vector_convergence[1-DG-1.8] _______________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10563'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d684797b8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('7bf6a621f8dcdd43974cb287d10b91d6', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('7bf6a621f8dcdd43974cb287d10b91d6', , False, False, False, , Access('INC'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/21/30676deeb60757b7a0a3eb9049d094.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/21/30676deeb60757b7a0a3eb9049d094.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 1, family = 'DG', expected_convergence = 1.8 @pytest.mark.parametrize(('degree', 'family', 'expected_convergence'), [ (1, 'CG', 1.8), (2, 'CG', 2.6), (3, 'CG', 3.8), (0, 'DG', 0.8), (1, 'DG', 1.8), (2, 'DG', 2.8)]) def test_vector_convergence(degree, family, expected_convergence): > l2_diff = np.array([run_vector_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_projection.py:95: in l2_diff = np.array([run_vector_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:35: in run_vector_test project(expr, ret, solver_parameters={'ksp_type': 'preonly', 'pc_type': 'lu'}) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:154: in solve with x.dat.vec_wo as x_, b.dat.vec_ro as b_: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_vector_convergence[2-DG-2.8] _______________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10569'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d68479c80> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('da33f079dfd9d4dad3df38de3a417c14', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('da33f079dfd9d4dad3df38de3a417c14', , False, False, False, , Access('INC'), (, dtype('float64'), (, (2,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/5d/3eff5791213e58d70f51cb5f0c6b1f.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/5d/3eff5791213e58d70f51cb5f0c6b1f.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 2, family = 'DG', expected_convergence = 2.8 @pytest.mark.parametrize(('degree', 'family', 'expected_convergence'), [ (1, 'CG', 1.8), (2, 'CG', 2.6), (3, 'CG', 3.8), (0, 'DG', 0.8), (1, 'DG', 1.8), (2, 'DG', 2.8)]) def test_vector_convergence(degree, family, expected_convergence): > l2_diff = np.array([run_vector_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_projection.py:95: in l2_diff = np.array([run_vector_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:35: in run_vector_test project(expr, ret, solver_parameters={'ksp_type': 'preonly', 'pc_type': 'lu'}) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:154: in solve with x.dat.vec_wo as x_, b.dat.vec_ro as b_: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_tensor_convergence[1-CG-1.8] _______________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10575'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d54e17d90> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('0ed7fda8ac67ddfe1589e85e80cc9111', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('0ed7fda8ac67ddfe1589e85e80cc9111', , False, False, False, , Access('INC'), (, dtype('float64'), (, (2, 2), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/3e/c8798c3f52a5f60cdf9056b73b905e.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/3e/c8798c3f52a5f60cdf9056b73b905e.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 1, family = 'CG', expected_convergence = 1.8 @pytest.mark.parametrize(('degree', 'family', 'expected_convergence'), [ (1, 'CG', 1.8), (2, 'CG', 2.6), (3, 'CG', 3.8), (0, 'DG', 0.8), (1, 'DG', 1.8), (2, 'DG', 2.8)]) def test_tensor_convergence(degree, family, expected_convergence): > l2_diff = np.array([run_tensor_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:108: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_projection.py:108: in l2_diff = np.array([run_tensor_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:53: in run_tensor_test project(expr, ret, solver_parameters={'ksp_type': 'preonly', 'pc_type': 'lu'}) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/linear_solver.py:157: in solve with self.inserted_options(), b.dat.vec_ro as rhs, acc as solution: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_tensor_convergence[2-CG-2.6] _______________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10580'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d980758c8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('2164e7a0a954640b85efae6f29600611', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('2164e7a0a954640b85efae6f29600611', , False, False, False, , Access('INC'), (, dtype('float64'), (, (2, 2), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/0d/64b5d756e646ae6378c87cc4a0e5bf.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/0d/64b5d756e646ae6378c87cc4a0e5bf.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 2, family = 'CG', expected_convergence = 2.6 @pytest.mark.parametrize(('degree', 'family', 'expected_convergence'), [ (1, 'CG', 1.8), (2, 'CG', 2.6), (3, 'CG', 3.8), (0, 'DG', 0.8), (1, 'DG', 1.8), (2, 'DG', 2.8)]) def test_tensor_convergence(degree, family, expected_convergence): > l2_diff = np.array([run_tensor_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:108: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_projection.py:108: in l2_diff = np.array([run_tensor_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:53: in run_tensor_test project(expr, ret, solver_parameters={'ksp_type': 'preonly', 'pc_type': 'lu'}) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/linear_solver.py:157: in solve with self.inserted_options(), b.dat.vec_ro as rhs, acc as solution: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_tensor_convergence[3-CG-3.8] _______________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10586'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3e0289a510> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('4b3e77ccbbbeec85c0f41ea2b88f829d', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('4b3e77ccbbbeec85c0f41ea2b88f829d', , False, False, False, , Access('INC'), (, dtype('float64'), (, (2, 2), (,))), ((, 10, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/69/735732561142a010d17cb6247174c8.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/69/735732561142a010d17cb6247174c8.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 3, family = 'CG', expected_convergence = 3.8 @pytest.mark.parametrize(('degree', 'family', 'expected_convergence'), [ (1, 'CG', 1.8), (2, 'CG', 2.6), (3, 'CG', 3.8), (0, 'DG', 0.8), (1, 'DG', 1.8), (2, 'DG', 2.8)]) def test_tensor_convergence(degree, family, expected_convergence): > l2_diff = np.array([run_tensor_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:108: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_projection.py:108: in l2_diff = np.array([run_tensor_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:53: in run_tensor_test project(expr, ret, solver_parameters={'ksp_type': 'preonly', 'pc_type': 'lu'}) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/linear_solver.py:157: in solve with self.inserted_options(), b.dat.vec_ro as rhs, acc as solution: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_tensor_convergence[0-DG-0.8] _______________________________________________________ cls = args = (Kernel(""" template static inline void subkernel0_cell_to_00_cell_integral_otherwise (const Eigen...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10592'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d62dcef28> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('726ff279ec18ddc027adf6f7394cbc26', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('726ff279ec18ddc027adf6f7394cbc26', , False, False, False, , Access('INC'), (, dtype('float64'), (((4, 4),),)), ((, 1, None), (, 1, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'cpp' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/11/81d1be255a08e5903d3d0c6c3148de.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/11/81d1be255a08e5903d3d0c6c3148de.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 0, family = 'DG', expected_convergence = 0.8 @pytest.mark.parametrize(('degree', 'family', 'expected_convergence'), [ (1, 'CG', 1.8), (2, 'CG', 2.6), (3, 'CG', 3.8), (0, 'DG', 0.8), (1, 'DG', 1.8), (2, 'DG', 2.8)]) def test_tensor_convergence(degree, family, expected_convergence): > l2_diff = np.array([run_tensor_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:108: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_projection.py:108: in l2_diff = np.array([run_tensor_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:53: in run_tensor_test project(expr, ret, solver_parameters={'ksp_type': 'preonly', 'pc_type': 'lu'}) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:153: in solve self.A.force_evaluation() firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicxx', '-fPIC', '-Wall', '-march=native', '-O3', '-ffast-math', ...] executable = b'mpicxx', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_tensor_convergence[1-DG-1.8] _______________________________________________________ cls = args = (Kernel(""" template static inline void subkernel0_cell_to_00_cell_integral_otherwise (const Eigen...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10598'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3dbf1dfc80> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('47d27bbd6c4587f8b71be02d399330d8', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('47d27bbd6c4587f8b71be02d399330d8', , False, False, False, , Access('INC'), (, dtype('float64'), (((4, 4),),)), ((, 3, None), (, 3, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'cpp' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/9c/e4a429f89a6e853b13d6dea926b2b0.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/9c/e4a429f89a6e853b13d6dea926b2b0.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 1, family = 'DG', expected_convergence = 1.8 @pytest.mark.parametrize(('degree', 'family', 'expected_convergence'), [ (1, 'CG', 1.8), (2, 'CG', 2.6), (3, 'CG', 3.8), (0, 'DG', 0.8), (1, 'DG', 1.8), (2, 'DG', 2.8)]) def test_tensor_convergence(degree, family, expected_convergence): > l2_diff = np.array([run_tensor_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:108: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_projection.py:108: in l2_diff = np.array([run_tensor_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:53: in run_tensor_test project(expr, ret, solver_parameters={'ksp_type': 'preonly', 'pc_type': 'lu'}) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:153: in solve self.A.force_evaluation() firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicxx', '-fPIC', '-Wall', '-march=native', '-O3', '-ffast-math', ...] executable = b'mpicxx', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_tensor_convergence[2-DG-2.8] _______________________________________________________ cls = args = (Kernel(""" template static inline void subkernel0_cell_to_00_cell_integral_otherwise (const Eigen...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10604'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d5f4f12f0> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('9920774bb574eaaea03cabd57b21ab03', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('9920774bb574eaaea03cabd57b21ab03', , False, False, False, , Access('INC'), (, dtype('float64'), (((4, 4),),)), ((, 6, None), (, 6, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'cpp' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/09/a1013d9fd0e1bfc51f8bbcde7f032a.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/09/a1013d9fd0e1bfc51f8bbcde7f032a.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 2, family = 'DG', expected_convergence = 2.8 @pytest.mark.parametrize(('degree', 'family', 'expected_convergence'), [ (1, 'CG', 1.8), (2, 'CG', 2.6), (3, 'CG', 3.8), (0, 'DG', 0.8), (1, 'DG', 1.8), (2, 'DG', 2.8)]) def test_tensor_convergence(degree, family, expected_convergence): > l2_diff = np.array([run_tensor_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:108: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_projection.py:108: in l2_diff = np.array([run_tensor_test(x, degree, family) for x in range(2, 5)]) tests/regression/test_projection.py:53: in run_tensor_test project(expr, ret, solver_parameters={'ksp_type': 'preonly', 'pc_type': 'lu'}) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:153: in solve self.A.force_evaluation() firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicxx', '-fPIC', '-Wall', '-march=native', '-O3', '-ffast-math', ...] executable = b'mpicxx', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________ test_vector_valued_convergence[1-RT-0.75] ___________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10610'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d5deb9a60> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('2b17878c24d029641da758862b64fde0', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('2b17878c24d029641da758862b64fde0', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/32/06cfe29b33e3a24917381510d1a143.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/32/06cfe29b33e3a24917381510d1a143.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 1, family = 'RT', expected_convergence = 0.75 @pytest.mark.parametrize(('degree', 'family', 'expected_convergence'), [ (1, 'RT', 0.75), (2, 'RT', 1.8), (3, 'RT', 2.8), (1, 'BDM', 1.8), (2, 'BDM', 2.8), (3, 'BDM', 3.8)]) def test_vector_valued_convergence(degree, family, expected_convergence): l2_diff = np.array([run_vector_valued_test(x, degree, family) > for x in range(2, 6)]) tests/regression/test_projection.py:122: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_projection.py:122: in for x in range(2, 6)]) tests/regression/test_projection.py:16: in run_vector_valued_test ret = project(expr, V, solver_parameters={'ksp_type': 'preonly', 'pc_type': 'lu'}) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/linear_solver.py:157: in solve with self.inserted_options(), b.dat.vec_ro as rhs, acc as solution: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________ test_vector_valued_convergence[2-RT-1.8] ____________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10616'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d685728c8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('540bc859a6a106ea0a93cc8816dfbc18', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('540bc859a6a106ea0a93cc8816dfbc18', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 8, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/2a/110f5834004e5c9a9a43eae0596654.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/2a/110f5834004e5c9a9a43eae0596654.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 2, family = 'RT', expected_convergence = 1.8 @pytest.mark.parametrize(('degree', 'family', 'expected_convergence'), [ (1, 'RT', 0.75), (2, 'RT', 1.8), (3, 'RT', 2.8), (1, 'BDM', 1.8), (2, 'BDM', 2.8), (3, 'BDM', 3.8)]) def test_vector_valued_convergence(degree, family, expected_convergence): l2_diff = np.array([run_vector_valued_test(x, degree, family) > for x in range(2, 6)]) tests/regression/test_projection.py:122: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_projection.py:122: in for x in range(2, 6)]) tests/regression/test_projection.py:16: in run_vector_valued_test ret = project(expr, V, solver_parameters={'ksp_type': 'preonly', 'pc_type': 'lu'}) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/linear_solver.py:157: in solve with self.inserted_options(), b.dat.vec_ro as rhs, acc as solution: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________ test_vector_valued_convergence[3-RT-2.8] ____________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10622'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3dcf41d620> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('871895a461609440c4a4260d13e431a2', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('871895a461609440c4a4260d13e431a2', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 15, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/d8/b325f09664f6bcb5a108d5afd6c483.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/d8/b325f09664f6bcb5a108d5afd6c483.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 3, family = 'RT', expected_convergence = 2.8 @pytest.mark.parametrize(('degree', 'family', 'expected_convergence'), [ (1, 'RT', 0.75), (2, 'RT', 1.8), (3, 'RT', 2.8), (1, 'BDM', 1.8), (2, 'BDM', 2.8), (3, 'BDM', 3.8)]) def test_vector_valued_convergence(degree, family, expected_convergence): l2_diff = np.array([run_vector_valued_test(x, degree, family) > for x in range(2, 6)]) tests/regression/test_projection.py:122: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_projection.py:122: in for x in range(2, 6)]) tests/regression/test_projection.py:16: in run_vector_valued_test ret = project(expr, V, solver_parameters={'ksp_type': 'preonly', 'pc_type': 'lu'}) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/linear_solver.py:157: in solve with self.inserted_options(), b.dat.vec_ro as rhs, acc as solution: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________ test_vector_valued_convergence[1-BDM-1.8] ___________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10628'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3e187ad9d8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('c7f7ee363a8e3c2f1917b93ef176b7b2', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('c7f7ee363a8e3c2f1917b93ef176b7b2', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/3a/1ac736351998fa83b940b17048c3e2.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/3a/1ac736351998fa83b940b17048c3e2.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 1, family = 'BDM', expected_convergence = 1.8 @pytest.mark.parametrize(('degree', 'family', 'expected_convergence'), [ (1, 'RT', 0.75), (2, 'RT', 1.8), (3, 'RT', 2.8), (1, 'BDM', 1.8), (2, 'BDM', 2.8), (3, 'BDM', 3.8)]) def test_vector_valued_convergence(degree, family, expected_convergence): l2_diff = np.array([run_vector_valued_test(x, degree, family) > for x in range(2, 6)]) tests/regression/test_projection.py:122: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_projection.py:122: in for x in range(2, 6)]) tests/regression/test_projection.py:16: in run_vector_valued_test ret = project(expr, V, solver_parameters={'ksp_type': 'preonly', 'pc_type': 'lu'}) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/linear_solver.py:157: in solve with self.inserted_options(), b.dat.vec_ro as rhs, acc as solution: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________ test_vector_valued_convergence[2-BDM-2.8] ___________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10634'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d99a96bf8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('44abac1f724a8e9ac1d9023c917ab5c9', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('44abac1f724a8e9ac1d9023c917ab5c9', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 12, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/0f/15eb231c6ecfe362774e040d1b576a.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/0f/15eb231c6ecfe362774e040d1b576a.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 2, family = 'BDM', expected_convergence = 2.8 @pytest.mark.parametrize(('degree', 'family', 'expected_convergence'), [ (1, 'RT', 0.75), (2, 'RT', 1.8), (3, 'RT', 2.8), (1, 'BDM', 1.8), (2, 'BDM', 2.8), (3, 'BDM', 3.8)]) def test_vector_valued_convergence(degree, family, expected_convergence): l2_diff = np.array([run_vector_valued_test(x, degree, family) > for x in range(2, 6)]) tests/regression/test_projection.py:122: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_projection.py:122: in for x in range(2, 6)]) tests/regression/test_projection.py:16: in run_vector_valued_test ret = project(expr, V, solver_parameters={'ksp_type': 'preonly', 'pc_type': 'lu'}) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/linear_solver.py:157: in solve with self.inserted_options(), b.dat.vec_ro as rhs, acc as solution: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________ test_vector_valued_convergence[3-BDM-3.8] ___________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10640'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d6819abf8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('6c3c6acb9550fdfea0e6bec301b7105b', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('6c3c6acb9550fdfea0e6bec301b7105b', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 20, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/3b/34547d12569faf744ed4b6c0707dc3.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/3b/34547d12569faf744ed4b6c0707dc3.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: degree = 3, family = 'BDM', expected_convergence = 3.8 @pytest.mark.parametrize(('degree', 'family', 'expected_convergence'), [ (1, 'RT', 0.75), (2, 'RT', 1.8), (3, 'RT', 2.8), (1, 'BDM', 1.8), (2, 'BDM', 2.8), (3, 'BDM', 3.8)]) def test_vector_valued_convergence(degree, family, expected_convergence): l2_diff = np.array([run_vector_valued_test(x, degree, family) > for x in range(2, 6)]) tests/regression/test_projection.py:122: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_projection.py:122: in for x in range(2, 6)]) tests/regression/test_projection.py:16: in run_vector_valued_test ret = project(expr, V, solver_parameters={'ksp_type': 'preonly', 'pc_type': 'lu'}) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/linear_solver.py:157: in solve with self.inserted_options(), b.dat.vec_ro as rhs, acc as solution: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________________ test_repeatable ________________________________________________________________ cls = args = (Kernel(""" template static inline void subkernel0_cell_to_00_cell_integral_otherwise (const Eigen... 'Coordinates'), Map(Set((2, 2, 2), 'Cells'), Set((4, 4, 4), 'set_10663'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d99f3fd90> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('13baaeac0f0c32a3b0d61f052eb8487e', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('13baaeac0f0c32a3b0d61f052eb8487e', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 3, None), (, 3, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'cpp' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/32/79109132af345a80374f5f8917b9e7.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/32/79109132af345a80374f5f8917b9e7.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: def test_repeatable(): mesh = UnitSquareMesh(1, 1) Q = FunctionSpace(mesh, 'DG', 1) V2 = FunctionSpace(mesh, 'DG', 0) V3 = FunctionSpace(mesh, 'DG', 0) W = V2 * V3 expr = Constant(1.0) > old = project(expr, Q) tests/regression/test_projection.py:187: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:153: in solve self.A.force_evaluation() firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicxx', '-fPIC', '-Wall', '-march=native', '-O3', '-ffast-math', ...] executable = b'mpicxx', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________________ test_projector _________________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----... 'Coordinates'), Map(Set((8, 8, 8), 'Cells'), Set((9, 9, 9), 'set_10669'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3e187adea0> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('e37f21743b564b3f0917b6aaa961480b', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('e37f21743b564b3f0917b6aaa961480b', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/65/eb98061a7352d53c0a772ba3d06996.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/65/eb98061a7352d53c0a772ba3d06996.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: def test_projector(): m = UnitSquareMesh(2, 2) Vc = FunctionSpace(m, "CG", 2) xs = SpatialCoordinate(m) v = Function(Vc).interpolate(xs[0]*xs[1] + cos(xs[0]+xs[1])) > mass1 = assemble(v*dx) tests/regression/test_projection.py:202: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________________ test_trivial_projector _____________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----... 'Coordinates'), Map(Set((8, 8, 8), 'Cells'), Set((9, 9, 9), 'set_10674'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3e01828268> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('e37f21743b564b3f0917b6aaa961480b', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('e37f21743b564b3f0917b6aaa961480b', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/65/eb98061a7352d53c0a772ba3d06996.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/65/eb98061a7352d53c0a772ba3d06996.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: def test_trivial_projector(): m = UnitSquareMesh(2, 2) Vc = FunctionSpace(m, "CG", 2) xs = SpatialCoordinate(m) v = Function(Vc).interpolate(xs[0]*xs[1] + cos(xs[0]+xs[1])) > mass1 = assemble(v*dx) tests/regression/test_projection.py:227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_projector_bcs[False-scalar] ________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth... 'Coordinates'), Map(Set((8, 8, 8), 'Cells'), Set((9, 9, 9), 'set_10679'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d6817b6a8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('2fe12e6f778a04660f8175d2578dfa10', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('2fe12e6f778a04660f8175d2578dfa10', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/47/1e8e2fdc38a2c7cd036fc6ed237fa6.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/47/1e8e2fdc38a2c7cd036fc6ed237fa6.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: tensor = 'scalar', same_fspace = False @pytest.mark.parametrize('tensor', ['scalar', 'vector', 'tensor']) @pytest.mark.parametrize('same_fspace', [False, True]) def test_projector_bcs(tensor, same_fspace): mesh = UnitSquareMesh(2, 2) x = SpatialCoordinate(mesh) if tensor == 'scalar': V = FunctionSpace(mesh, "CG", 1) V_ho = FunctionSpace(mesh, "CG", 5) bcs = [DirichletBC(V_ho, Constant(0.5), (1, 3)), DirichletBC(V_ho, Constant(-0.5), (2, 4))] fct = cos(x[0]*pi*2)*sin(x[1]*pi*2) elif tensor == 'vector': V = VectorFunctionSpace(mesh, "CG", 1) V_ho = VectorFunctionSpace(mesh, "CG", 5) bcs = [DirichletBC(V_ho, Constant((0.5, 0.5)), (1, 3)), DirichletBC(V_ho, Constant((-0.5, -0.5)), (2, 4))] fct = as_vector([cos(x[0]*pi*2)*sin(x[1]*pi*2), cos(x[0]*pi*2)*sin(x[1]*pi*2)]) elif tensor == 'tensor': V = TensorFunctionSpace(mesh, "CG", 1) V_ho = TensorFunctionSpace(mesh, "CG", 5) bcs = [DirichletBC(V_ho, Constant(((0.5, 0.5), (0.5, 0.5))), (1, 3)), DirichletBC(V_ho, Constant(((-0.5, -0.5), (-0.5, -0.5))), (2, 4))] fct = as_tensor([[cos(x[0]*pi*2)*sin(x[1]*pi*2), cos(x[0]*pi*2)*sin(x[1]*pi*2)], [cos(x[0]*pi*2)*sin(x[1]*pi*2), cos(x[0]*pi*2)*sin(x[1]*pi*2)]]) if same_fspace: v = Function(V_ho).project(fct) else: > v = Function(V).project(fct) tests/regression/test_projection.py:280: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/linear_solver.py:157: in solve with self.inserted_options(), b.dat.vec_ro as rhs, acc as solution: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_projector_bcs[False-vector] ________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth... 'Coordinates'), Map(Set((8, 8, 8), 'Cells'), Set((9, 9, 9), 'set_10684'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d6819a400> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('7bf6a621f8dcdd43974cb287d10b91d6', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('7bf6a621f8dcdd43974cb287d10b91d6', , False, False, False, , Access('INC'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/f2/ecc82e2c7921a705cc4dc20b1ba40f.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/f2/ecc82e2c7921a705cc4dc20b1ba40f.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: tensor = 'vector', same_fspace = False @pytest.mark.parametrize('tensor', ['scalar', 'vector', 'tensor']) @pytest.mark.parametrize('same_fspace', [False, True]) def test_projector_bcs(tensor, same_fspace): mesh = UnitSquareMesh(2, 2) x = SpatialCoordinate(mesh) if tensor == 'scalar': V = FunctionSpace(mesh, "CG", 1) V_ho = FunctionSpace(mesh, "CG", 5) bcs = [DirichletBC(V_ho, Constant(0.5), (1, 3)), DirichletBC(V_ho, Constant(-0.5), (2, 4))] fct = cos(x[0]*pi*2)*sin(x[1]*pi*2) elif tensor == 'vector': V = VectorFunctionSpace(mesh, "CG", 1) V_ho = VectorFunctionSpace(mesh, "CG", 5) bcs = [DirichletBC(V_ho, Constant((0.5, 0.5)), (1, 3)), DirichletBC(V_ho, Constant((-0.5, -0.5)), (2, 4))] fct = as_vector([cos(x[0]*pi*2)*sin(x[1]*pi*2), cos(x[0]*pi*2)*sin(x[1]*pi*2)]) elif tensor == 'tensor': V = TensorFunctionSpace(mesh, "CG", 1) V_ho = TensorFunctionSpace(mesh, "CG", 5) bcs = [DirichletBC(V_ho, Constant(((0.5, 0.5), (0.5, 0.5))), (1, 3)), DirichletBC(V_ho, Constant(((-0.5, -0.5), (-0.5, -0.5))), (2, 4))] fct = as_tensor([[cos(x[0]*pi*2)*sin(x[1]*pi*2), cos(x[0]*pi*2)*sin(x[1]*pi*2)], [cos(x[0]*pi*2)*sin(x[1]*pi*2), cos(x[0]*pi*2)*sin(x[1]*pi*2)]]) if same_fspace: v = Function(V_ho).project(fct) else: > v = Function(V).project(fct) tests/regression/test_projection.py:280: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/linear_solver.py:157: in solve with self.inserted_options(), b.dat.vec_ro as rhs, acc as solution: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_projector_bcs[False-tensor] ________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth... 'Coordinates'), Map(Set((8, 8, 8), 'Cells'), Set((9, 9, 9), 'set_10689'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d6817b840> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('0ed7fda8ac67ddfe1589e85e80cc9111', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('0ed7fda8ac67ddfe1589e85e80cc9111', , False, False, False, , Access('INC'), (, dtype('float64'), (, (2, 2), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/3e/c8798c3f52a5f60cdf9056b73b905e.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/3e/c8798c3f52a5f60cdf9056b73b905e.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: tensor = 'tensor', same_fspace = False @pytest.mark.parametrize('tensor', ['scalar', 'vector', 'tensor']) @pytest.mark.parametrize('same_fspace', [False, True]) def test_projector_bcs(tensor, same_fspace): mesh = UnitSquareMesh(2, 2) x = SpatialCoordinate(mesh) if tensor == 'scalar': V = FunctionSpace(mesh, "CG", 1) V_ho = FunctionSpace(mesh, "CG", 5) bcs = [DirichletBC(V_ho, Constant(0.5), (1, 3)), DirichletBC(V_ho, Constant(-0.5), (2, 4))] fct = cos(x[0]*pi*2)*sin(x[1]*pi*2) elif tensor == 'vector': V = VectorFunctionSpace(mesh, "CG", 1) V_ho = VectorFunctionSpace(mesh, "CG", 5) bcs = [DirichletBC(V_ho, Constant((0.5, 0.5)), (1, 3)), DirichletBC(V_ho, Constant((-0.5, -0.5)), (2, 4))] fct = as_vector([cos(x[0]*pi*2)*sin(x[1]*pi*2), cos(x[0]*pi*2)*sin(x[1]*pi*2)]) elif tensor == 'tensor': V = TensorFunctionSpace(mesh, "CG", 1) V_ho = TensorFunctionSpace(mesh, "CG", 5) bcs = [DirichletBC(V_ho, Constant(((0.5, 0.5), (0.5, 0.5))), (1, 3)), DirichletBC(V_ho, Constant(((-0.5, -0.5), (-0.5, -0.5))), (2, 4))] fct = as_tensor([[cos(x[0]*pi*2)*sin(x[1]*pi*2), cos(x[0]*pi*2)*sin(x[1]*pi*2)], [cos(x[0]*pi*2)*sin(x[1]*pi*2), cos(x[0]*pi*2)*sin(x[1]*pi*2)]]) if same_fspace: v = Function(V_ho).project(fct) else: > v = Function(V).project(fct) tests/regression/test_projection.py:280: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/linear_solver.py:157: in solve with self.inserted_options(), b.dat.vec_ro as rhs, acc as solution: /usr/lib/python3.6/contextlib.py:81: in __enter__ return next(self.gen) ../PyOP2/pyop2/petsc_base.py:336: in vec_context write=access is not base.READ) ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_projector_bcs[True-scalar] ________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form00_cell_integral_ot... 'Coordinates'), Map(Set((8, 8, 8), 'Cells'), Set((9, 9, 9), 'set_10694'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3dca6beea0> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('caeba81381042990d2a0903a37aff5ad', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('caeba81381042990d2a0903a37aff5ad', , False, False, False, , Access('INC'), (, dtype('float64'), (((1, 1),),)), ((, 21, None), (, 21, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/d9/9b5f60eb5fd2b9a518a6b78d778590.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/d9/9b5f60eb5fd2b9a518a6b78d778590.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: tensor = 'scalar', same_fspace = True @pytest.mark.parametrize('tensor', ['scalar', 'vector', 'tensor']) @pytest.mark.parametrize('same_fspace', [False, True]) def test_projector_bcs(tensor, same_fspace): mesh = UnitSquareMesh(2, 2) x = SpatialCoordinate(mesh) if tensor == 'scalar': V = FunctionSpace(mesh, "CG", 1) V_ho = FunctionSpace(mesh, "CG", 5) bcs = [DirichletBC(V_ho, Constant(0.5), (1, 3)), DirichletBC(V_ho, Constant(-0.5), (2, 4))] fct = cos(x[0]*pi*2)*sin(x[1]*pi*2) elif tensor == 'vector': V = VectorFunctionSpace(mesh, "CG", 1) V_ho = VectorFunctionSpace(mesh, "CG", 5) bcs = [DirichletBC(V_ho, Constant((0.5, 0.5)), (1, 3)), DirichletBC(V_ho, Constant((-0.5, -0.5)), (2, 4))] fct = as_vector([cos(x[0]*pi*2)*sin(x[1]*pi*2), cos(x[0]*pi*2)*sin(x[1]*pi*2)]) elif tensor == 'tensor': V = TensorFunctionSpace(mesh, "CG", 1) V_ho = TensorFunctionSpace(mesh, "CG", 5) bcs = [DirichletBC(V_ho, Constant(((0.5, 0.5), (0.5, 0.5))), (1, 3)), DirichletBC(V_ho, Constant(((-0.5, -0.5), (-0.5, -0.5))), (2, 4))] fct = as_tensor([[cos(x[0]*pi*2)*sin(x[1]*pi*2), cos(x[0]*pi*2)*sin(x[1]*pi*2)], [cos(x[0]*pi*2)*sin(x[1]*pi*2), cos(x[0]*pi*2)*sin(x[1]*pi*2)]]) if same_fspace: > v = Function(V_ho).project(fct) tests/regression/test_projection.py:278: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:158: in apply_massinv return self.solver.solve ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:144: in solver return firedrake.LinearSolver(self.A, solver_parameters=self.solver_parameters) firedrake/linear_solver.py:97: in __init__ self.A.force_evaluation() firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_projector_bcs[True-vector] ________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form00_cell_integral_ot... 'Coordinates'), Map(Set((8, 8, 8), 'Cells'), Set((9, 9, 9), 'set_10699'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d9adcf730> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('8b948de692923923fb7945565b938d22', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('8b948de692923923fb7945565b938d22', , False, False, False, , Access('INC'), (, dtype('float64'), (((2, 2),),)), ((, 21, None), (, 21, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/8f/ee918d4ab70029a0738166de54cff7.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/8f/ee918d4ab70029a0738166de54cff7.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: tensor = 'vector', same_fspace = True @pytest.mark.parametrize('tensor', ['scalar', 'vector', 'tensor']) @pytest.mark.parametrize('same_fspace', [False, True]) def test_projector_bcs(tensor, same_fspace): mesh = UnitSquareMesh(2, 2) x = SpatialCoordinate(mesh) if tensor == 'scalar': V = FunctionSpace(mesh, "CG", 1) V_ho = FunctionSpace(mesh, "CG", 5) bcs = [DirichletBC(V_ho, Constant(0.5), (1, 3)), DirichletBC(V_ho, Constant(-0.5), (2, 4))] fct = cos(x[0]*pi*2)*sin(x[1]*pi*2) elif tensor == 'vector': V = VectorFunctionSpace(mesh, "CG", 1) V_ho = VectorFunctionSpace(mesh, "CG", 5) bcs = [DirichletBC(V_ho, Constant((0.5, 0.5)), (1, 3)), DirichletBC(V_ho, Constant((-0.5, -0.5)), (2, 4))] fct = as_vector([cos(x[0]*pi*2)*sin(x[1]*pi*2), cos(x[0]*pi*2)*sin(x[1]*pi*2)]) elif tensor == 'tensor': V = TensorFunctionSpace(mesh, "CG", 1) V_ho = TensorFunctionSpace(mesh, "CG", 5) bcs = [DirichletBC(V_ho, Constant(((0.5, 0.5), (0.5, 0.5))), (1, 3)), DirichletBC(V_ho, Constant(((-0.5, -0.5), (-0.5, -0.5))), (2, 4))] fct = as_tensor([[cos(x[0]*pi*2)*sin(x[1]*pi*2), cos(x[0]*pi*2)*sin(x[1]*pi*2)], [cos(x[0]*pi*2)*sin(x[1]*pi*2), cos(x[0]*pi*2)*sin(x[1]*pi*2)]]) if same_fspace: > v = Function(V_ho).project(fct) tests/regression/test_projection.py:278: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:158: in apply_massinv return self.solver.solve ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:144: in solver return firedrake.LinearSolver(self.A, solver_parameters=self.solver_parameters) firedrake/linear_solver.py:97: in __init__ self.A.force_evaluation() firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_projector_bcs[True-tensor] ________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form00_cell_integral_ot... 'Coordinates'), Map(Set((8, 8, 8), 'Cells'), Set((9, 9, 9), 'set_10704'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d99a96bf8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('3fa857350252258d27e9e154f8a8960f', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('3fa857350252258d27e9e154f8a8960f', , False, False, False, , Access('INC'), (, dtype('float64'), (((4, 4),),)), ((, 21, None), (, 21, None)), False, 0, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/79/5cff1d7354ad5fcb805db4d86ba9c6.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/79/5cff1d7354ad5fcb805db4d86ba9c6.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: tensor = 'tensor', same_fspace = True @pytest.mark.parametrize('tensor', ['scalar', 'vector', 'tensor']) @pytest.mark.parametrize('same_fspace', [False, True]) def test_projector_bcs(tensor, same_fspace): mesh = UnitSquareMesh(2, 2) x = SpatialCoordinate(mesh) if tensor == 'scalar': V = FunctionSpace(mesh, "CG", 1) V_ho = FunctionSpace(mesh, "CG", 5) bcs = [DirichletBC(V_ho, Constant(0.5), (1, 3)), DirichletBC(V_ho, Constant(-0.5), (2, 4))] fct = cos(x[0]*pi*2)*sin(x[1]*pi*2) elif tensor == 'vector': V = VectorFunctionSpace(mesh, "CG", 1) V_ho = VectorFunctionSpace(mesh, "CG", 5) bcs = [DirichletBC(V_ho, Constant((0.5, 0.5)), (1, 3)), DirichletBC(V_ho, Constant((-0.5, -0.5)), (2, 4))] fct = as_vector([cos(x[0]*pi*2)*sin(x[1]*pi*2), cos(x[0]*pi*2)*sin(x[1]*pi*2)]) elif tensor == 'tensor': V = TensorFunctionSpace(mesh, "CG", 1) V_ho = TensorFunctionSpace(mesh, "CG", 5) bcs = [DirichletBC(V_ho, Constant(((0.5, 0.5), (0.5, 0.5))), (1, 3)), DirichletBC(V_ho, Constant(((-0.5, -0.5), (-0.5, -0.5))), (2, 4))] fct = as_tensor([[cos(x[0]*pi*2)*sin(x[1]*pi*2), cos(x[0]*pi*2)*sin(x[1]*pi*2)], [cos(x[0]*pi*2)*sin(x[1]*pi*2), cos(x[0]*pi*2)*sin(x[1]*pi*2)]]) if same_fspace: > v = Function(V_ho).project(fct) tests/regression/test_projection.py:278: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:158: in apply_massinv return self.solver.solve ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:144: in solver return firedrake.LinearSolver(self.A, solver_parameters=self.solver_parameters) firedrake/linear_solver.py:97: in __init__ self.A.force_evaluation() firedrake/matrix.py:138: in force_evaluation self._M._force_evaluation() ../PyOP2/pyop2/base.py:1454: in _force_evaluation _trace.evaluate(reads, writes) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________ test_firedrake_projection_scalar_convergence[Morley-2-2.4] ___________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form_cell_integral_othe...tion_33593'), Map(Set((8, 8, 8), 'Cells'), Set((25, 25, 25), 'set_10712'), 6, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3e132aed08> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('3dd2e38b8b5d2ded4d5cb9898a57e659', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('3dd2e38b8b5d2ded4d5cb9898a57e659', , False, False, False, , Access('INC'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/e6/925d754208720170da3211a30e782a.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/e6/925d754208720170da3211a30e782a.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: el = 'Morley', deg = 2, convrate = 2.4 @pytest.mark.parametrize(('el', 'deg', 'convrate'), [('Morley', 2, 2.4), ('Hermite', 3, 3), ('Bell', 5, 4), ('Argyris', 5, 4.9)]) def test_firedrake_projection_scalar_convergence(el, deg, convrate): > diff = np.array([do_projection(i, el, deg) for i in range(1, 4)]) tests/regression/test_projection_zany.py:43: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_projection_zany.py:43: in diff = np.array([do_projection(i, el, deg) for i in range(1, 4)]) tests/regression/test_projection_zany.py:34: in do_projection return sqrt(assemble(dot(x - f, x - f) * dx)) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('a44aa3302d8d0725a6ee97bcdce0f7c1', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 1, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/20/46db8db49f7c223fe5145797eeb805.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ___________________________________________ test_firedrake_projection_scalar_convergence[Hermite-3-3] ___________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form_cell_integral_othe...ion_33600'), Map(Set((8, 8, 8), 'Cells'), Set((35, 35, 35), 'set_10717'), 10, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d68479d08> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('475cd8f0ec8d0381a8e9b314c4a82c73', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('475cd8f0ec8d0381a8e9b314c4a82c73', , False, False, False, , Access('INC'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 10, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/16/d199c05e4b55c215594947b51d3aaa.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/16/d199c05e4b55c215594947b51d3aaa.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: el = 'Hermite', deg = 3, convrate = 3 @pytest.mark.parametrize(('el', 'deg', 'convrate'), [('Morley', 2, 2.4), ('Hermite', 3, 3), ('Bell', 5, 4), ('Argyris', 5, 4.9)]) def test_firedrake_projection_scalar_convergence(el, deg, convrate): > diff = np.array([do_projection(i, el, deg) for i in range(1, 4)]) tests/regression/test_projection_zany.py:43: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_projection_zany.py:43: in diff = np.array([do_projection(i, el, deg) for i in range(1, 4)]) tests/regression/test_projection_zany.py:34: in do_projection return sqrt(assemble(dot(x - f, x - f) * dx)) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('b166c4a53a9fc004d7d8e057553e85b2', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 10, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 1, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 10, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/83/d948e236f321705c9fa23f59e1f59c.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________________ test_firedrake_projection_scalar_convergence[Bell-5-4] _____________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form_cell_integral_othe...ion_33607'), Map(Set((8, 8, 8), 'Cells'), Set((54, 54, 54), 'set_10722'), 18, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3dca69d510> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('ca31b51e49a079f3c1f4f19f5fac9776', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('ca31b51e49a079f3c1f4f19f5fac9776', , False, False, False, , Access('INC'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 18, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/22/14acab4494a6a62851d986a4f4b550.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/22/14acab4494a6a62851d986a4f4b550.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: el = 'Bell', deg = 5, convrate = 4 @pytest.mark.parametrize(('el', 'deg', 'convrate'), [('Morley', 2, 2.4), ('Hermite', 3, 3), ('Bell', 5, 4), ('Argyris', 5, 4.9)]) def test_firedrake_projection_scalar_convergence(el, deg, convrate): > diff = np.array([do_projection(i, el, deg) for i in range(1, 4)]) tests/regression/test_projection_zany.py:43: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_projection_zany.py:43: in diff = np.array([do_projection(i, el, deg) for i in range(1, 4)]) tests/regression/test_projection_zany.py:34: in do_projection return sqrt(assemble(dot(x - f, x - f) * dx)) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('9a248d437aeceff2042dbf367591da13', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 18, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 1, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 18, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/db/d7819bd9f77460e681b85b3ae1b527.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________________________ test_firedrake_projection_scalar_convergence[Argyris-5-4.9] __________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form_cell_integral_othe...ion_33614'), Map(Set((8, 8, 8), 'Cells'), Set((70, 70, 70), 'set_10727'), 21, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d62e51730> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('de89698d238dc16daca8f49bf57bc50b', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('de89698d238dc16daca8f49bf57bc50b', , False, False, False, , Access('INC'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 21, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/fd/91f6216e19d0ddbb3a166c6a22cd9c.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/fd/91f6216e19d0ddbb3a166c6a22cd9c.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: el = 'Argyris', deg = 5, convrate = 4.9 @pytest.mark.parametrize(('el', 'deg', 'convrate'), [('Morley', 2, 2.4), ('Hermite', 3, 3), ('Bell', 5, 4), ('Argyris', 5, 4.9)]) def test_firedrake_projection_scalar_convergence(el, deg, convrate): > diff = np.array([do_projection(i, el, deg) for i in range(1, 4)]) tests/regression/test_projection_zany.py:43: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_projection_zany.py:43: in diff = np.array([do_projection(i, el, deg) for i in range(1, 4)]) tests/regression/test_projection_zany.py:34: in do_projection return sqrt(assemble(dot(x - f, x - f) * dx)) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 197, in __new__ return cls._cache_lookup(key) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 205, in _cache_lookup return cls._cache[key] KeyError: ('e13e555cb559c783d1d324f3711667f6', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 21, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 3, None),), False, 1, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 21, None),), False, 0, None, , 4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 264, in get_so return ctypes.CDLL(soname) File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/simone/firedrake/.cache/pyop2/c3/ee241350cd611aa7cbb69b06fcc74a.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 263, in form_function with ctx._F.dat.vec_ro as v: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/home/simone/firedrake/src/PyOP2/pyop2/petsc_base.py", line 336, in vec_context write=access is not base.READ) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1454, in _force_evaluation _trace.evaluate(reads, writes) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 192, in evaluate comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3792, in compute fun = self._jitmodule File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 207, in _jitmodule pass_layer_arg=self._pass_layer_arg) File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 199, in __new__ obj = make_obj() File "/home/simone/firedrake/src/PyOP2/pyop2/caching.py", line 189, in make_obj obj.__init__(*args, **kwargs) File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 101, in __init__ self.compile() File "/home/simone/firedrake/src/PyOP2/pyop2/sequential.py", line 159, in compile comm=self.comm) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 476, in load dll = compiler.get_so(code, extension) File "/home/simone/firedrake/src/PyOP2/pyop2/compilation.py", line 294, in get_so stdout=log) File "/usr/lib/python3.6/subprocess.py", line 306, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 287, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1295, in _execute_child restore_signals, start_new_session, preexec_fn) OSError: [Errno 12] Cannot allocate memory The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ______________________________________________________________ test_python_parloop ______________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form_cell_integral_othe...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10729'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d6817bb70> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('c3f8c133fcc84714ceb826762d41f896', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('c3f8c133fcc84714ceb826762d41f896', , False, False, False, , Access('INC'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 1, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/0f/e4520ab7972f2623e6ea9a849b6778.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/0f/e4520ab7972f2623e6ea9a849b6778.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: def test_python_parloop(): m = UnitSquareMesh(4, 4) fs = FunctionSpace(m, "CG", 2) f = Function(fs) class MyExpression(Expression): def eval(self, value, X): value[:] = np.dot(X, X) f.interpolate(MyExpression()) X = m.coordinates > assert assemble((f-dot(X, X))**2*dx)**.5 < 1.e-15 tests/regression/test_python_parloop.py:19: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_python_parloop_vector ___________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form_cell_integral_othe...dinates'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10734'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d6817b9d8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('ac30ab92b5c20644b7246ed4fe0dd09e', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('ac30ab92b5c20644b7246ed4fe0dd09e', , False, False, False, , Access('INC'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/a9/2523dda710eba55e74431ab002d44a.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/a9/2523dda710eba55e74431ab002d44a.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: def test_python_parloop_vector(): m = UnitSquareMesh(4, 4) fs = VectorFunctionSpace(m, "CG", 1) f = Function(fs) class MyExpression(Expression): def eval(self, value, X): value[:] = X def value_shape(self): return (2,) f.interpolate(MyExpression()) X = m.coordinates > assert assemble((f - X)**2*dx)**.5 < 1.e-15 tests/regression/test_python_parloop.py:38: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________________ test_python_parloop_vector_1D _________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form_cell_integral_othe... 'Coordinates'), Map(Set((4, 4, 4), 'Cells'), Set((5, 5, 5), 'set_10738'), 2, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d6845d0d0> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('73a117ddc9b20b6676ff05d1bb460c76', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('73a117ddc9b20b6676ff05d1bb460c76', , False, False, False, , Access('INC'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/7b/e2cd1f284f28f5d386a9b3f577e521.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/7b/e2cd1f284f28f5d386a9b3f577e521.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: def test_python_parloop_vector_1D(): m = UnitIntervalMesh(4) fs = VectorFunctionSpace(m, "CG", 1) f = Function(fs) class MyExpression(Expression): def eval(self, value, X): value[:] = X def value_shape(self): return (1,) f.interpolate(MyExpression()) X = m.coordinates > assert assemble((f - X)**2*dx)**.5 < 1.e-15 tests/regression/test_python_parloop.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_python_parloop_user_kwarg _________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form_cell_integral_othe...n_33636'), Map(Set((32, 32, 32), 'Cells'), Set((81, 81, 81), 'set_10745'), 6, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3e03ab0510> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('bf4b77f02f2174d976833eb89bdf60a5', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('bf4b77f02f2174d976833eb89bdf60a5', , False, False, False, , Access('INC'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/10/5562a48dbb7112cb40d2bf4a25990d.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/10/5562a48dbb7112cb40d2bf4a25990d.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: def test_python_parloop_user_kwarg(): m = UnitSquareMesh(4, 4) fs = FunctionSpace(m, "CG", 2) f = Function(fs) class MyExpression(Expression): def eval(self, value, X, t=None): value[:] = t f.interpolate(MyExpression(t=10.0)) > assert np.allclose(assemble(f*dx), 10.0) tests/regression/test_python_parloop.py:71: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________________ test_python_parloop_vector_user_kwarg _____________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----..._33641'), Map(Set((32, 32, 32), 'Cells'), Set((25, 25, 25), 'set_10747'), 3, None, 'None_cell_node'), Access('WRITE'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3e187ad400> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('09894e45291be4f495d02edf9a8764f1', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('09894e45291be4f495d02edf9a8764f1', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/da/99dc1b52b092e06ee4155ccce9bee3.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/da/99dc1b52b092e06ee4155ccce9bee3.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: def test_python_parloop_vector_user_kwarg(): m = UnitSquareMesh(4, 4) fs = VectorFunctionSpace(m, "CG", 1) f = Function(fs) class MyExpression(Expression): def eval(self, value, X, b=None, a=None): value[0] = a value[1] = b def value_shape(self): return (2,) f.interpolate(MyExpression(a=1.0, b=2.0)) exact = Function(fs) exact.interpolate(as_vector((1.0, 2.0))) > assert np.allclose(assemble((f - exact)**2*dx), 0.0) tests/regression/test_python_parloop.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_hand_specified_quadrature _________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth...dinates'), Map(Set((50, 50, 50), 'Cells'), Set((36, 36, 36), 'set_10751'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d99a9a730> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('9d83b28189f5b641f8544e2d35f3608e', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('9d83b28189f5b641f8544e2d35f3608e', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 6, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 1, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/1d/1bc23d2ae2c48e8fc3d0de7ded49c7.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/1d/1bc23d2ae2c48e8fc3d0de7ded49c7.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: def test_hand_specified_quadrature(): mesh = UnitSquareMesh(5, 5) V = FunctionSpace(mesh, 'CG', 2) v = TestFunction(V) a = v*dx > norm_q0 = norm(assemble(a, form_compiler_parameters={'quadrature_degree': 0})) tests/regression/test_quadrature.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/norms.py:77: in norm return assemble((expr**(p/2))*dx)**(1/p) firedrake/assemble.py:111: in assemble m = l() firedrake/assemble.py:388: in result = lambda: tensor.data[0] ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_real_one_form_assembly __________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth... 'Coordinates'), Map(Set((3, 3, 3), 'Cells'), Set((4, 4, 4), 'set_10760'), 2, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d68572d90> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('fffe2e3fa28fccc31d1dd406ce1cd4cd', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('fffe2e3fa28fccc31d1dd406ce1cd4cd', , False, False, False, , Access('INC'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/2d/c9b3517d43a6c86299afe4347949a3.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/2d/c9b3517d43a6c86299afe4347949a3.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: def test_real_one_form_assembly(): mesh = UnitIntervalMesh(3) fs = FunctionSpace(mesh, "Real", 0) v = TestFunction(fs) > assert assemble(v*dx).dat.data[0] == 1.0 tests/regression/test_real_space.py:22: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_real_two_form_assembly __________________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form00_cell_integral_ot... 'Coordinates'), Map(Set((3, 3, 3), 'Cells'), Set((4, 4, 4), 'set_10764'), 2, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3d6878da60> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('5e48c09724e43c379b76a7679a3226cc', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('5e48c09724e43c379b76a7679a3226cc', , False, False, False, , Access('INC'), (, dtype('float64'), (1,)), None, False, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/6a/bc4f67e8063f3afb7c006675fbf333.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/6a/bc4f67e8063f3afb7c006675fbf333.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: def test_real_two_form_assembly(): mesh = UnitIntervalMesh(3) fs = FunctionSpace(mesh, "Real", 0) u = TrialFunction(fs) v = TestFunction(fs) > assert assemble(2*u*v*dx).M.values == 2.0 tests/regression/test_real_space.py:31: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../PyOP2/pyop2/petsc_base.py:967: in values return self.handle.getPythonContext()[:, :] ../PyOP2/pyop2/petsc_base.py:1125: in __getitem__ return self.global_.data_ro.reshape(1, 1)[key] ../PyOP2/pyop2/base.py:2527: in data_ro view = self.data.view() ../PyOP2/pyop2/base.py:2515: in data _trace.evaluate(set([self]), set()) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________________ test_real_nonsquare_two_form_assembly _____________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth... 'Coordinates'), Map(Set((3, 3, 3), 'Cells'), Set((4, 4, 4), 'set_10768'), 2, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3db9444bf8> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('538070b1b1b94f683a18c0867cafeff8', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('538070b1b1b94f683a18c0867cafeff8', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/2f/3cf90e79cde421424d043d0a8fb721.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/2f/3cf90e79cde421424d043d0a8fb721.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: def test_real_nonsquare_two_form_assembly(): mesh = UnitIntervalMesh(3) rfs = FunctionSpace(mesh, "Real", 0) cgfs = FunctionSpace(mesh, "CG", 1) u = TrialFunction(rfs) v = TestFunction(cgfs) base_case = assemble(2*v*dx) m1 = assemble(2*u*v*dx) u = TrialFunction(cgfs) v = TestFunction(rfs) m2 = assemble(2*u*v*dx) > np.testing.assert_almost_equal(base_case.dat.data, m1.M.values[:, 0]) tests/regression/test_real_space.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../PyOP2/pyop2/base.py:1623: in data _trace.evaluate(set([self]), set([self])) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_real_mixed_one_form_assembly _______________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: form0_cell_integral_oth... 'Coordinates'), Map(Set((3, 3, 3), 'Cells'), Set((4, 4, 4), 'set_10772'), 2, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3e132aea60> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('a1f8df9f0ee115f1d1d141b7dd854ac4', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('a1f8df9f0ee115f1d1d141b7dd854ac4', , False, False, False, , Access('INC'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (1,), (,))), ((, 2, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/a2/9de2e29e735a955cabc91f03a58fa6.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/a2/9de2e29e735a955cabc91f03a58fa6.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: def test_real_mixed_one_form_assembly(): mesh = UnitIntervalMesh(3) rfs = FunctionSpace(mesh, "Real", 0) cgfs = FunctionSpace(mesh, "CG", 1) mfs = cgfs*rfs v, q = TestFunctions(mfs) A = assemble(v*dx + q*dx) qq = TestFunction(rfs) AA = assemble(qq*dx) > np.testing.assert_almost_equal(A.dat.data[1], AA.dat.data) tests/regression/test_real_space.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../PyOP2/pyop2/base.py:2215: in data return tuple(s.data for s in self._dats) ../PyOP2/pyop2/base.py:2215: in return tuple(s.data for s in self._dats) ../PyOP2/pyop2/base.py:1623: in data _trace.evaluate(set([self]), set([self])) ../PyOP2/pyop2/base.py:192: in evaluate comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_real_mixed_two_form_assembly _______________________________________________________ cls = args = (Kernel("""--------------------------------------------------------------------------- KERNEL: expression_kernel -----...t((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ'))) kwargs = {'iterate': None, 'pass_layer_arg': False}, make_obj = .make_obj at 0x7f3dcf489a60> def __new__(cls, *args, **kwargs): args, kwargs = cls._process_args(*args, **kwargs) key = cls._cache_key(*args, **kwargs) def make_obj(): obj = super(Cached, cls).__new__(cls) obj._key = key obj._initialized = False # obj.__init__ will be called twice when constructing # something not in the cache. The first time here, with # the canonicalised args, the second time directly in the # subclass. But that one should hit the cache and return # straight away. obj.__init__(*args, **kwargs) return obj # Don't bother looking in caches if we're not meant to cache # this object. if key is None: return make_obj() try: > return cls._cache_lookup(key) ../PyOP2/pyop2/caching.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = key = ('690b69da86191309b14ca98346f2997a', , False, False, False, , ...) @classmethod def _cache_lookup(cls, key): > return cls._cache[key] E KeyError: ('690b69da86191309b14ca98346f2997a', , False, False, False, , Access('WRITE'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, , Access('READ'), (, dtype('float64'), (, (2,), (,))), ((, 3, None),), False, 0, None, , 4) ../PyOP2/pyop2/caching.py:205: KeyError During handling of the above exception, another exception occurred: self = , jitmodule = extension = 'c' @collective def get_so(self, jitmodule, extension): """Build a shared library and load it :arg jitmodule: The JIT Module which can generate the code to compile. :arg extension: extension of the source file (c, cpp). Returns a :class:`ctypes.CDLL` object of the resulting shared library.""" # Determine cache key hsh = md5(str(jitmodule.cache_key).encode()) hsh.update(self._cc.encode()) if self._ld: hsh.update(self._ld.encode()) hsh.update("".join(self._cppargs).encode()) hsh.update("".join(self._ldargs).encode()) basename = hsh.hexdigest() cachedir = configuration['cache_dir'] dirpart, basename = basename[:2], basename[2:] cachedir = os.path.join(cachedir, dirpart) pid = os.getpid() cname = os.path.join(cachedir, "%s_p%d.%s" % (basename, pid, extension)) oname = os.path.join(cachedir, "%s_p%d.o" % (basename, pid)) soname = os.path.join(cachedir, "%s.so" % basename) # Link into temporary file, then rename to shared library # atomically (avoiding races). tmpname = os.path.join(cachedir, "%s_p%d.so.tmp" % (basename, pid)) if configuration['check_src_hashes'] or configuration['debug']: matching = self.comm.allreduce(basename, op=_check_op) if matching != basename: # Dump all src code to disk for debugging output = os.path.join(cachedir, "mismatching-kernels") srcfile = os.path.join(output, "src-rank%d.c" % self.comm.rank) if self.comm.rank == 0: os.makedirs(output, exist_ok=True) self.comm.barrier() with open(srcfile, "w") as f: f.write(jitmodule.code_to_compile) self.comm.barrier() raise CompilationError("Generated code differs across ranks (see output in %s)" % output) try: # Are we in the cache? > return ctypes.CDLL(soname) ../PyOP2/pyop2/compilation.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = '/home/simone/firedrake/.cache/pyop2/b5/2653acc2216b980ecfdfcd1eea35a8.so', mode = 0, handle = None, use_errno = False use_last_error = False def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: > self._handle = _dlopen(self._name, mode) E OSError: /home/simone/firedrake/.cache/pyop2/b5/2653acc2216b980ecfdfcd1eea35a8.so: cannot open shared object file: No such file or directory /usr/lib/python3.6/ctypes/__init__.py:348: OSError During handling of the above exception, another exception occurred: def test_real_mixed_two_form_assembly(): mesh = UnitIntervalMesh(3) rfs = FunctionSpace(mesh, "Real", 0) cgfs = FunctionSpace(mesh, "CG", 1) mfs = cgfs*rfs u, p = TrialFunctions(mfs) v, q = TestFunctions(mfs) m = assemble(u*v*dx + p*q*dx + u*q*dx + p*v*dx) qq = TestFunction(rfs) vv = TestFunction(cgfs) uu = TrialFunction(cgfs) > m00 = assemble(uu*vv*dx) tests/regression/test_real_space.py:87: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3792: in compute fun = self._jitmodule ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) ../PyOP2/pyop2/sequential.py:207: in _jitmodule pass_layer_arg=self._pass_layer_arg) ../PyOP2/pyop2/caching.py:199: in __new__ obj = make_obj() ../PyOP2/pyop2/caching.py:189: in make_obj obj.__init__(*args, **kwargs) ../PyOP2/pyop2/sequential.py:101: in __init__ self.compile() ../PyOP2/pyop2/sequential.py:159: in compile comm=self.comm) ../PyOP2/pyop2/compilation.py:476: in load dll = compiler.get_so(code, extension) ../PyOP2/pyop2/compilation.py:294: in get_so stdout=log) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpicc', '-std=c99', '-fPIC', '-Wall', '-march=native', '-O3', ...] executable = b'mpicc', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0 shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = 27, errread = -1, errwrite = 28, restore_signals = True start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________ test_real_extruded_mixed_two_form_assembly ___________________________________________________ def test_real_extruded_mixed_two_form_assembly(): m = UnitIntervalMesh(3) > mesh = ExtrudedMesh(m, 10) tests/regression/test_real_space.py:114: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________________ test_real_mixed_solve _____________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_real_mixed_solve_split_comms _______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________________ test_real_space_mixed_assign __________________________________________________________ def test_real_space_mixed_assign(): mesh = UnitIntervalMesh(4) V = FunctionSpace(mesh, "Real", 0) Q = FunctionSpace(mesh, "CG", 1) W = Q*V f = Function(W) q, v = f.split() > q.assign(2) tests/regression/test_real_space.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________________________ test_real_space_assign _____________________________________________________________ def test_real_space_assign(): mesh = UnitIntervalMesh(4) V = FunctionSpace(mesh, "Real", 0) f = Function(V) > f.assign(2) tests/regression/test_real_space.py:245: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ test_math_functions[scalar-Function-f=(1)-expr=(f)] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = 1, typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[scalar-Function-f=(1)-expr=(2*f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = 1, typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[scalar-Function-f=(1)-expr=(tanh(f))] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = 1, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[scalar-Function-f=(1)-expr=(2 * tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = 1, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[scalar-Function-f=(1)-expr=(f + tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = 1, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[scalar-Function-f=(1)-expr=(cos(f) + sin(f))] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = 1, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________ test_math_functions[scalar-Function-f=(1)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] ________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 1 typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[scalar-Function-f=(1)-expr=(tanh(f) + cos(f) + sin(f))] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = 1, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_math_functions[scalar-Function-f=(1)-expr=(1.0/tanh(f) + 1.0/f)] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[scalar-Function-f=(1)-expr=(sqrt(f*f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = 1, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________ test_math_functions[scalar-Function-f=(1)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] ___________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 1 typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[scalar-Function-f=(10)-expr=(f)] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = 10, typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[scalar-Function-f=(10)-expr=(2*f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = 10, typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[scalar-Function-f=(10)-expr=(tanh(f))] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = 10, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[scalar-Function-f=(10)-expr=(2 * tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = 10, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[scalar-Function-f=(10)-expr=(f + tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = 10, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_math_functions[scalar-Function-f=(10)-expr=(cos(f) + sin(f))] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = 10, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________ test_math_functions[scalar-Function-f=(10)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] ________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 10 typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________ test_math_functions[scalar-Function-f=(10)-expr=(tanh(f) + cos(f) + sin(f))] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = 10 typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[scalar-Function-f=(10)-expr=(1.0/tanh(f) + 1.0/f)] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[scalar-Function-f=(10)-expr=(sqrt(f*f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = 10, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________ test_math_functions[scalar-Function-f=(10)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] ___________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 10 typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[scalar-Function-f=(20)-expr=(f)] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = 20, typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[scalar-Function-f=(20)-expr=(2*f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = 20, typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[scalar-Function-f=(20)-expr=(tanh(f))] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = 20, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[scalar-Function-f=(20)-expr=(2 * tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = 20, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[scalar-Function-f=(20)-expr=(f + tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = 20, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_math_functions[scalar-Function-f=(20)-expr=(cos(f) + sin(f))] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = 20, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________ test_math_functions[scalar-Function-f=(20)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] ________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 20 typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________ test_math_functions[scalar-Function-f=(20)-expr=(tanh(f) + cos(f) + sin(f))] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = 20 typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[scalar-Function-f=(20)-expr=(1.0/tanh(f) + 1.0/f)] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = 20, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[scalar-Function-f=(20)-expr=(sqrt(f*f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = 20, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________ test_math_functions[scalar-Function-f=(20)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] ___________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 20 typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[scalar-Function-f=(-1)-expr=(f)] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = -1, typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[scalar-Function-f=(-1)-expr=(2*f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = -1, typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[scalar-Function-f=(-1)-expr=(tanh(f))] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = -1, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[scalar-Function-f=(-1)-expr=(2 * tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = -1, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[scalar-Function-f=(-1)-expr=(f + tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = -1, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_math_functions[scalar-Function-f=(-1)-expr=(cos(f) + sin(f))] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = -1, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________ test_math_functions[scalar-Function-f=(-1)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] ________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -1 typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________ test_math_functions[scalar-Function-f=(-1)-expr=(tanh(f) + cos(f) + sin(f))] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = -1 typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[scalar-Function-f=(-1)-expr=(1.0/tanh(f) + 1.0/f)] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[scalar-Function-f=(-1)-expr=(sqrt(f*f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = -1, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________ test_math_functions[scalar-Function-f=(-1)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] ___________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -1 typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[scalar-Function-f=(-10)-expr=(f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = -10, typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[scalar-Function-f=(-10)-expr=(2*f)] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = -10, typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[scalar-Function-f=(-10)-expr=(tanh(f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = -10, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[scalar-Function-f=(-10)-expr=(2 * tanh(f))] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = -10, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[scalar-Function-f=(-10)-expr=(f + tanh(f))] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = -10, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_math_functions[scalar-Function-f=(-10)-expr=(cos(f) + sin(f))] ______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = -10, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________ test_math_functions[scalar-Function-f=(-10)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] _______________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -10 typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________ test_math_functions[scalar-Function-f=(-10)-expr=(tanh(f) + cos(f) + sin(f))] _________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = -10 typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[scalar-Function-f=(-10)-expr=(1.0/tanh(f) + 1.0/f)] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[scalar-Function-f=(-10)-expr=(sqrt(f*f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = -10, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________ test_math_functions[scalar-Function-f=(-10)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] __________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -10 typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[scalar-Function-f=(-20)-expr=(f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = -20, typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[scalar-Function-f=(-20)-expr=(2*f)] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = -20, typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[scalar-Function-f=(-20)-expr=(tanh(f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = -20, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[scalar-Function-f=(-20)-expr=(2 * tanh(f))] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = -20, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[scalar-Function-f=(-20)-expr=(f + tanh(f))] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = -20, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_math_functions[scalar-Function-f=(-20)-expr=(cos(f) + sin(f))] ______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = -20, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________ test_math_functions[scalar-Function-f=(-20)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] _______________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -20 typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________ test_math_functions[scalar-Function-f=(-20)-expr=(tanh(f) + cos(f) + sin(f))] _________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = -20 typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[scalar-Function-f=(-20)-expr=(1.0/tanh(f) + 1.0/f)] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = -20, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[scalar-Function-f=(-20)-expr=(sqrt(f*f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = -20, typ = 'Function' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________ test_math_functions[scalar-Function-f=(-20)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] __________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -20 typ = 'Function', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ test_math_functions[scalar-Constant-f=(1)-expr=(f)] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = 1, typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________________ test_math_functions[scalar-Constant-f=(1)-expr=(2*f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = 1, typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ___________________________________________ test_math_functions[scalar-Constant-f=(1)-expr=(tanh(f))] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = 1, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________ test_math_functions[scalar-Constant-f=(1)-expr=(2 * tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = 1, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________ test_math_functions[scalar-Constant-f=(1)-expr=(f + tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = 1, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _______________________________________ test_math_functions[scalar-Constant-f=(1)-expr=(cos(f) + sin(f))] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = 1, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________ test_math_functions[scalar-Constant-f=(1)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] ________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 1 typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________________ test_math_functions[scalar-Constant-f=(1)-expr=(tanh(f) + cos(f) + sin(f))] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = 1, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________ test_math_functions[scalar-Constant-f=(1)-expr=(1.0/tanh(f) + 1.0/f)] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________________________ test_math_functions[scalar-Constant-f=(1)-expr=(sqrt(f*f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = 1, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ___________________________ test_math_functions[scalar-Constant-f=(1)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] ___________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 1 typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________________ test_math_functions[scalar-Constant-f=(10)-expr=(f)] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = 10, typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________________ test_math_functions[scalar-Constant-f=(10)-expr=(2*f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = 10, typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________________________ test_math_functions[scalar-Constant-f=(10)-expr=(tanh(f))] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = 10, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[scalar-Constant-f=(10)-expr=(2 * tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = 10, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[scalar-Constant-f=(10)-expr=(f + tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = 10, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ______________________________________ test_math_functions[scalar-Constant-f=(10)-expr=(cos(f) + sin(f))] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = 10, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _______________________________ test_math_functions[scalar-Constant-f=(10)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] ________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 10 typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________ test_math_functions[scalar-Constant-f=(10)-expr=(tanh(f) + cos(f) + sin(f))] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = 10 typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________ test_math_functions[scalar-Constant-f=(10)-expr=(1.0/tanh(f) + 1.0/f)] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________ test_math_functions[scalar-Constant-f=(10)-expr=(sqrt(f*f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = 10, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________ test_math_functions[scalar-Constant-f=(10)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] ___________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 10 typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________________ test_math_functions[scalar-Constant-f=(20)-expr=(f)] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = 20, typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________________ test_math_functions[scalar-Constant-f=(20)-expr=(2*f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = 20, typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________________________ test_math_functions[scalar-Constant-f=(20)-expr=(tanh(f))] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = 20, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[scalar-Constant-f=(20)-expr=(2 * tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = 20, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[scalar-Constant-f=(20)-expr=(f + tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = 20, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ______________________________________ test_math_functions[scalar-Constant-f=(20)-expr=(cos(f) + sin(f))] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = 20, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _______________________________ test_math_functions[scalar-Constant-f=(20)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] ________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 20 typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________ test_math_functions[scalar-Constant-f=(20)-expr=(tanh(f) + cos(f) + sin(f))] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = 20 typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________ test_math_functions[scalar-Constant-f=(20)-expr=(1.0/tanh(f) + 1.0/f)] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = 20, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________ test_math_functions[scalar-Constant-f=(20)-expr=(sqrt(f*f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = 20, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________ test_math_functions[scalar-Constant-f=(20)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] ___________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 20 typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________________ test_math_functions[scalar-Constant-f=(-1)-expr=(f)] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = -1, typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________________ test_math_functions[scalar-Constant-f=(-1)-expr=(2*f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = -1, typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________________________ test_math_functions[scalar-Constant-f=(-1)-expr=(tanh(f))] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = -1, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[scalar-Constant-f=(-1)-expr=(2 * tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = -1, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[scalar-Constant-f=(-1)-expr=(f + tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = -1, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ______________________________________ test_math_functions[scalar-Constant-f=(-1)-expr=(cos(f) + sin(f))] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = -1, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _______________________________ test_math_functions[scalar-Constant-f=(-1)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] ________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -1 typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________ test_math_functions[scalar-Constant-f=(-1)-expr=(tanh(f) + cos(f) + sin(f))] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = -1 typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________ test_math_functions[scalar-Constant-f=(-1)-expr=(1.0/tanh(f) + 1.0/f)] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________ test_math_functions[scalar-Constant-f=(-1)-expr=(sqrt(f*f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = -1, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________ test_math_functions[scalar-Constant-f=(-1)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] ___________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -1 typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________________ test_math_functions[scalar-Constant-f=(-10)-expr=(f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = -10, typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________________ test_math_functions[scalar-Constant-f=(-10)-expr=(2*f)] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = -10, typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________________________ test_math_functions[scalar-Constant-f=(-10)-expr=(tanh(f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = -10, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[scalar-Constant-f=(-10)-expr=(2 * tanh(f))] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = -10, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[scalar-Constant-f=(-10)-expr=(f + tanh(f))] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = -10, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ______________________________________ test_math_functions[scalar-Constant-f=(-10)-expr=(cos(f) + sin(f))] ______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = -10, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _______________________________ test_math_functions[scalar-Constant-f=(-10)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] _______________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -10 typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________ test_math_functions[scalar-Constant-f=(-10)-expr=(tanh(f) + cos(f) + sin(f))] _________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = -10 typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________ test_math_functions[scalar-Constant-f=(-10)-expr=(1.0/tanh(f) + 1.0/f)] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________ test_math_functions[scalar-Constant-f=(-10)-expr=(sqrt(f*f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = -10, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________ test_math_functions[scalar-Constant-f=(-10)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] __________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -10 typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________________ test_math_functions[scalar-Constant-f=(-20)-expr=(f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = -20, typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________________ test_math_functions[scalar-Constant-f=(-20)-expr=(2*f)] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = -20, typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________________________ test_math_functions[scalar-Constant-f=(-20)-expr=(tanh(f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = -20, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[scalar-Constant-f=(-20)-expr=(2 * tanh(f))] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = -20, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[scalar-Constant-f=(-20)-expr=(f + tanh(f))] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = -20, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ______________________________________ test_math_functions[scalar-Constant-f=(-20)-expr=(cos(f) + sin(f))] ______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = -20, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _______________________________ test_math_functions[scalar-Constant-f=(-20)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] _______________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -20 typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________ test_math_functions[scalar-Constant-f=(-20)-expr=(tanh(f) + cos(f) + sin(f))] _________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = -20 typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________ test_math_functions[scalar-Constant-f=(-20)-expr=(1.0/tanh(f) + 1.0/f)] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = -20, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________ test_math_functions[scalar-Constant-f=(-20)-expr=(sqrt(f*f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = -20, typ = 'Constant' fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________ test_math_functions[scalar-Constant-f=(-20)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] __________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -20 typ = 'Constant', fs_type = 'scalar' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ______________________________________________ test_math_functions[vector-Function-f=(1)-expr=(f)] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = 1, typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[vector-Function-f=(1)-expr=(2*f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = 1, typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[vector-Function-f=(1)-expr=(tanh(f))] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = 1, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[vector-Function-f=(1)-expr=(2 * tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = 1, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[vector-Function-f=(1)-expr=(f + tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = 1, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[vector-Function-f=(1)-expr=(cos(f) + sin(f))] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = 1, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________ test_math_functions[vector-Function-f=(1)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] ________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 1 typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[vector-Function-f=(1)-expr=(tanh(f) + cos(f) + sin(f))] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = 1, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_math_functions[vector-Function-f=(1)-expr=(1.0/tanh(f) + 1.0/f)] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[vector-Function-f=(1)-expr=(sqrt(f*f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = 1, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________ test_math_functions[vector-Function-f=(1)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] ___________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 1 typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[vector-Function-f=(10)-expr=(f)] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = 10, typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[vector-Function-f=(10)-expr=(2*f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = 10, typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[vector-Function-f=(10)-expr=(tanh(f))] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = 10, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[vector-Function-f=(10)-expr=(2 * tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = 10, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[vector-Function-f=(10)-expr=(f + tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = 10, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_math_functions[vector-Function-f=(10)-expr=(cos(f) + sin(f))] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = 10, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________ test_math_functions[vector-Function-f=(10)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] ________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 10 typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________ test_math_functions[vector-Function-f=(10)-expr=(tanh(f) + cos(f) + sin(f))] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = 10 typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[vector-Function-f=(10)-expr=(1.0/tanh(f) + 1.0/f)] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[vector-Function-f=(10)-expr=(sqrt(f*f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = 10, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________ test_math_functions[vector-Function-f=(10)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] ___________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 10 typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[vector-Function-f=(20)-expr=(f)] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = 20, typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[vector-Function-f=(20)-expr=(2*f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = 20, typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[vector-Function-f=(20)-expr=(tanh(f))] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = 20, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[vector-Function-f=(20)-expr=(2 * tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = 20, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[vector-Function-f=(20)-expr=(f + tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = 20, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_math_functions[vector-Function-f=(20)-expr=(cos(f) + sin(f))] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = 20, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________ test_math_functions[vector-Function-f=(20)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] ________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 20 typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________ test_math_functions[vector-Function-f=(20)-expr=(tanh(f) + cos(f) + sin(f))] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = 20 typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[vector-Function-f=(20)-expr=(1.0/tanh(f) + 1.0/f)] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = 20, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[vector-Function-f=(20)-expr=(sqrt(f*f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = 20, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________ test_math_functions[vector-Function-f=(20)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] ___________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 20 typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[vector-Function-f=(-1)-expr=(f)] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = -1, typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[vector-Function-f=(-1)-expr=(2*f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = -1, typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[vector-Function-f=(-1)-expr=(tanh(f))] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = -1, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[vector-Function-f=(-1)-expr=(2 * tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = -1, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[vector-Function-f=(-1)-expr=(f + tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = -1, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_math_functions[vector-Function-f=(-1)-expr=(cos(f) + sin(f))] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = -1, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________ test_math_functions[vector-Function-f=(-1)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] ________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -1 typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________ test_math_functions[vector-Function-f=(-1)-expr=(tanh(f) + cos(f) + sin(f))] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = -1 typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[vector-Function-f=(-1)-expr=(1.0/tanh(f) + 1.0/f)] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[vector-Function-f=(-1)-expr=(sqrt(f*f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = -1, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________ test_math_functions[vector-Function-f=(-1)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] ___________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -1 typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[vector-Function-f=(-10)-expr=(f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = -10, typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[vector-Function-f=(-10)-expr=(2*f)] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = -10, typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[vector-Function-f=(-10)-expr=(tanh(f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = -10, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[vector-Function-f=(-10)-expr=(2 * tanh(f))] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = -10, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[vector-Function-f=(-10)-expr=(f + tanh(f))] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = -10, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_math_functions[vector-Function-f=(-10)-expr=(cos(f) + sin(f))] ______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = -10, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________ test_math_functions[vector-Function-f=(-10)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] _______________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -10 typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________ test_math_functions[vector-Function-f=(-10)-expr=(tanh(f) + cos(f) + sin(f))] _________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = -10 typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[vector-Function-f=(-10)-expr=(1.0/tanh(f) + 1.0/f)] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[vector-Function-f=(-10)-expr=(sqrt(f*f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = -10, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________ test_math_functions[vector-Function-f=(-10)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] __________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -10 typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[vector-Function-f=(-20)-expr=(f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = -20, typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[vector-Function-f=(-20)-expr=(2*f)] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = -20, typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[vector-Function-f=(-20)-expr=(tanh(f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = -20, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[vector-Function-f=(-20)-expr=(2 * tanh(f))] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = -20, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[vector-Function-f=(-20)-expr=(f + tanh(f))] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = -20, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_math_functions[vector-Function-f=(-20)-expr=(cos(f) + sin(f))] ______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = -20, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________ test_math_functions[vector-Function-f=(-20)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] _______________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -20 typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________ test_math_functions[vector-Function-f=(-20)-expr=(tanh(f) + cos(f) + sin(f))] _________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = -20 typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[vector-Function-f=(-20)-expr=(1.0/tanh(f) + 1.0/f)] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = -20, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[vector-Function-f=(-20)-expr=(sqrt(f*f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = -20, typ = 'Function' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________ test_math_functions[vector-Function-f=(-20)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] __________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -20 typ = 'Function', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ test_math_functions[vector-Constant-f=(1)-expr=(f)] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = 1, typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________________ test_math_functions[vector-Constant-f=(1)-expr=(2*f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = 1, typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ___________________________________________ test_math_functions[vector-Constant-f=(1)-expr=(tanh(f))] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = 1, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________ test_math_functions[vector-Constant-f=(1)-expr=(2 * tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = 1, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________ test_math_functions[vector-Constant-f=(1)-expr=(f + tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = 1, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _______________________________________ test_math_functions[vector-Constant-f=(1)-expr=(cos(f) + sin(f))] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = 1, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________ test_math_functions[vector-Constant-f=(1)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] ________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 1 typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________________ test_math_functions[vector-Constant-f=(1)-expr=(tanh(f) + cos(f) + sin(f))] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = 1, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________ test_math_functions[vector-Constant-f=(1)-expr=(1.0/tanh(f) + 1.0/f)] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________________________ test_math_functions[vector-Constant-f=(1)-expr=(sqrt(f*f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = 1, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ___________________________ test_math_functions[vector-Constant-f=(1)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] ___________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 1 typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________________ test_math_functions[vector-Constant-f=(10)-expr=(f)] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = 10, typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________________ test_math_functions[vector-Constant-f=(10)-expr=(2*f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = 10, typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________________________ test_math_functions[vector-Constant-f=(10)-expr=(tanh(f))] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = 10, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[vector-Constant-f=(10)-expr=(2 * tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = 10, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[vector-Constant-f=(10)-expr=(f + tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = 10, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ______________________________________ test_math_functions[vector-Constant-f=(10)-expr=(cos(f) + sin(f))] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = 10, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _______________________________ test_math_functions[vector-Constant-f=(10)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] ________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 10 typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________ test_math_functions[vector-Constant-f=(10)-expr=(tanh(f) + cos(f) + sin(f))] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = 10 typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________ test_math_functions[vector-Constant-f=(10)-expr=(1.0/tanh(f) + 1.0/f)] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________ test_math_functions[vector-Constant-f=(10)-expr=(sqrt(f*f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = 10, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________ test_math_functions[vector-Constant-f=(10)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] ___________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 10 typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________________ test_math_functions[vector-Constant-f=(20)-expr=(f)] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = 20, typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________________ test_math_functions[vector-Constant-f=(20)-expr=(2*f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = 20, typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________________________ test_math_functions[vector-Constant-f=(20)-expr=(tanh(f))] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = 20, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[vector-Constant-f=(20)-expr=(2 * tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = 20, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[vector-Constant-f=(20)-expr=(f + tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = 20, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ______________________________________ test_math_functions[vector-Constant-f=(20)-expr=(cos(f) + sin(f))] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = 20, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _______________________________ test_math_functions[vector-Constant-f=(20)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] ________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 20 typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________ test_math_functions[vector-Constant-f=(20)-expr=(tanh(f) + cos(f) + sin(f))] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = 20 typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________ test_math_functions[vector-Constant-f=(20)-expr=(1.0/tanh(f) + 1.0/f)] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = 20, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________ test_math_functions[vector-Constant-f=(20)-expr=(sqrt(f*f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = 20, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________ test_math_functions[vector-Constant-f=(20)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] ___________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 20 typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________________ test_math_functions[vector-Constant-f=(-1)-expr=(f)] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = -1, typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________________ test_math_functions[vector-Constant-f=(-1)-expr=(2*f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = -1, typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________________________ test_math_functions[vector-Constant-f=(-1)-expr=(tanh(f))] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = -1, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[vector-Constant-f=(-1)-expr=(2 * tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = -1, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[vector-Constant-f=(-1)-expr=(f + tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = -1, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ______________________________________ test_math_functions[vector-Constant-f=(-1)-expr=(cos(f) + sin(f))] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = -1, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _______________________________ test_math_functions[vector-Constant-f=(-1)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] ________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -1 typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________ test_math_functions[vector-Constant-f=(-1)-expr=(tanh(f) + cos(f) + sin(f))] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = -1 typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________ test_math_functions[vector-Constant-f=(-1)-expr=(1.0/tanh(f) + 1.0/f)] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________ test_math_functions[vector-Constant-f=(-1)-expr=(sqrt(f*f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = -1, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________ test_math_functions[vector-Constant-f=(-1)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] ___________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -1 typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________________ test_math_functions[vector-Constant-f=(-10)-expr=(f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = -10, typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________________ test_math_functions[vector-Constant-f=(-10)-expr=(2*f)] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = -10, typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________________________ test_math_functions[vector-Constant-f=(-10)-expr=(tanh(f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = -10, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[vector-Constant-f=(-10)-expr=(2 * tanh(f))] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = -10, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[vector-Constant-f=(-10)-expr=(f + tanh(f))] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = -10, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ______________________________________ test_math_functions[vector-Constant-f=(-10)-expr=(cos(f) + sin(f))] ______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = -10, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _______________________________ test_math_functions[vector-Constant-f=(-10)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] _______________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -10 typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________ test_math_functions[vector-Constant-f=(-10)-expr=(tanh(f) + cos(f) + sin(f))] _________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = -10 typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________ test_math_functions[vector-Constant-f=(-10)-expr=(1.0/tanh(f) + 1.0/f)] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________ test_math_functions[vector-Constant-f=(-10)-expr=(sqrt(f*f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = -10, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________ test_math_functions[vector-Constant-f=(-10)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] __________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -10 typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________________ test_math_functions[vector-Constant-f=(-20)-expr=(f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = -20, typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________________ test_math_functions[vector-Constant-f=(-20)-expr=(2*f)] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = -20, typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________________________ test_math_functions[vector-Constant-f=(-20)-expr=(tanh(f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = -20, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[vector-Constant-f=(-20)-expr=(2 * tanh(f))] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = -20, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[vector-Constant-f=(-20)-expr=(f + tanh(f))] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = -20, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ______________________________________ test_math_functions[vector-Constant-f=(-20)-expr=(cos(f) + sin(f))] ______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = -20, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _______________________________ test_math_functions[vector-Constant-f=(-20)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] _______________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -20 typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________ test_math_functions[vector-Constant-f=(-20)-expr=(tanh(f) + cos(f) + sin(f))] _________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = -20 typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________ test_math_functions[vector-Constant-f=(-20)-expr=(1.0/tanh(f) + 1.0/f)] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = -20, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________ test_math_functions[vector-Constant-f=(-20)-expr=(sqrt(f*f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = -20, typ = 'Constant' fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________ test_math_functions[vector-Constant-f=(-20)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] __________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -20 typ = 'Constant', fs_type = 'vector' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ______________________________________________ test_math_functions[tensor-Function-f=(1)-expr=(f)] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = 1, typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[tensor-Function-f=(1)-expr=(2*f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = 1, typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[tensor-Function-f=(1)-expr=(tanh(f))] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = 1, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[tensor-Function-f=(1)-expr=(2 * tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = 1, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[tensor-Function-f=(1)-expr=(f + tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = 1, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[tensor-Function-f=(1)-expr=(cos(f) + sin(f))] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = 1, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________ test_math_functions[tensor-Function-f=(1)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] ________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 1 typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[tensor-Function-f=(1)-expr=(tanh(f) + cos(f) + sin(f))] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = 1, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_math_functions[tensor-Function-f=(1)-expr=(1.0/tanh(f) + 1.0/f)] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[tensor-Function-f=(1)-expr=(sqrt(f*f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = 1, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________ test_math_functions[tensor-Function-f=(1)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] ___________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 1 typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[tensor-Function-f=(10)-expr=(f)] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = 10, typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[tensor-Function-f=(10)-expr=(2*f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = 10, typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[tensor-Function-f=(10)-expr=(tanh(f))] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = 10, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[tensor-Function-f=(10)-expr=(2 * tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = 10, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[tensor-Function-f=(10)-expr=(f + tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = 10, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_math_functions[tensor-Function-f=(10)-expr=(cos(f) + sin(f))] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = 10, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________ test_math_functions[tensor-Function-f=(10)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] ________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 10 typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________ test_math_functions[tensor-Function-f=(10)-expr=(tanh(f) + cos(f) + sin(f))] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = 10 typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[tensor-Function-f=(10)-expr=(1.0/tanh(f) + 1.0/f)] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[tensor-Function-f=(10)-expr=(sqrt(f*f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = 10, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________ test_math_functions[tensor-Function-f=(10)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] ___________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 10 typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[tensor-Function-f=(20)-expr=(f)] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = 20, typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[tensor-Function-f=(20)-expr=(2*f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = 20, typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[tensor-Function-f=(20)-expr=(tanh(f))] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = 20, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[tensor-Function-f=(20)-expr=(2 * tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = 20, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[tensor-Function-f=(20)-expr=(f + tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = 20, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_math_functions[tensor-Function-f=(20)-expr=(cos(f) + sin(f))] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = 20, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________ test_math_functions[tensor-Function-f=(20)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] ________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 20 typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________ test_math_functions[tensor-Function-f=(20)-expr=(tanh(f) + cos(f) + sin(f))] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = 20 typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[tensor-Function-f=(20)-expr=(1.0/tanh(f) + 1.0/f)] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = 20, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[tensor-Function-f=(20)-expr=(sqrt(f*f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = 20, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________ test_math_functions[tensor-Function-f=(20)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] ___________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 20 typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[tensor-Function-f=(-1)-expr=(f)] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = -1, typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[tensor-Function-f=(-1)-expr=(2*f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = -1, typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[tensor-Function-f=(-1)-expr=(tanh(f))] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = -1, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[tensor-Function-f=(-1)-expr=(2 * tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = -1, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[tensor-Function-f=(-1)-expr=(f + tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = -1, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_math_functions[tensor-Function-f=(-1)-expr=(cos(f) + sin(f))] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = -1, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________ test_math_functions[tensor-Function-f=(-1)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] ________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -1 typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________ test_math_functions[tensor-Function-f=(-1)-expr=(tanh(f) + cos(f) + sin(f))] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = -1 typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[tensor-Function-f=(-1)-expr=(1.0/tanh(f) + 1.0/f)] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[tensor-Function-f=(-1)-expr=(sqrt(f*f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = -1, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________ test_math_functions[tensor-Function-f=(-1)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] ___________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -1 typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[tensor-Function-f=(-10)-expr=(f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = -10, typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[tensor-Function-f=(-10)-expr=(2*f)] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = -10, typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[tensor-Function-f=(-10)-expr=(tanh(f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = -10, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[tensor-Function-f=(-10)-expr=(2 * tanh(f))] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = -10, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[tensor-Function-f=(-10)-expr=(f + tanh(f))] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = -10, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_math_functions[tensor-Function-f=(-10)-expr=(cos(f) + sin(f))] ______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = -10, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________ test_math_functions[tensor-Function-f=(-10)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] _______________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -10 typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________ test_math_functions[tensor-Function-f=(-10)-expr=(tanh(f) + cos(f) + sin(f))] _________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = -10 typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[tensor-Function-f=(-10)-expr=(1.0/tanh(f) + 1.0/f)] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[tensor-Function-f=(-10)-expr=(sqrt(f*f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = -10, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________ test_math_functions[tensor-Function-f=(-10)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] __________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -10 typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[tensor-Function-f=(-20)-expr=(f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = -20, typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[tensor-Function-f=(-20)-expr=(2*f)] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = -20, typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[tensor-Function-f=(-20)-expr=(tanh(f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = -20, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[tensor-Function-f=(-20)-expr=(2 * tanh(f))] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = -20, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[tensor-Function-f=(-20)-expr=(f + tanh(f))] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = -20, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_math_functions[tensor-Function-f=(-20)-expr=(cos(f) + sin(f))] ______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = -20, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________ test_math_functions[tensor-Function-f=(-20)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] _______________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -20 typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________ test_math_functions[tensor-Function-f=(-20)-expr=(tanh(f) + cos(f) + sin(f))] _________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = -20 typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[tensor-Function-f=(-20)-expr=(1.0/tanh(f) + 1.0/f)] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = -20, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[tensor-Function-f=(-20)-expr=(sqrt(f*f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = -20, typ = 'Function' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________ test_math_functions[tensor-Function-f=(-20)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] __________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -20 typ = 'Function', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_scaled_mass.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ test_math_functions[tensor-Constant-f=(1)-expr=(f)] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = 1, typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________________ test_math_functions[tensor-Constant-f=(1)-expr=(2*f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = 1, typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ___________________________________________ test_math_functions[tensor-Constant-f=(1)-expr=(tanh(f))] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = 1, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________ test_math_functions[tensor-Constant-f=(1)-expr=(2 * tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = 1, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________ test_math_functions[tensor-Constant-f=(1)-expr=(f + tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = 1, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _______________________________________ test_math_functions[tensor-Constant-f=(1)-expr=(cos(f) + sin(f))] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = 1, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________ test_math_functions[tensor-Constant-f=(1)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] ________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 1 typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________________ test_math_functions[tensor-Constant-f=(1)-expr=(tanh(f) + cos(f) + sin(f))] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = 1, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________ test_math_functions[tensor-Constant-f=(1)-expr=(1.0/tanh(f) + 1.0/f)] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________________________ test_math_functions[tensor-Constant-f=(1)-expr=(sqrt(f*f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = 1, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ___________________________ test_math_functions[tensor-Constant-f=(1)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] ___________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 1 typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________________ test_math_functions[tensor-Constant-f=(10)-expr=(f)] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = 10, typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________________ test_math_functions[tensor-Constant-f=(10)-expr=(2*f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = 10, typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________________________ test_math_functions[tensor-Constant-f=(10)-expr=(tanh(f))] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = 10, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[tensor-Constant-f=(10)-expr=(2 * tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = 10, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[tensor-Constant-f=(10)-expr=(f + tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = 10, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ______________________________________ test_math_functions[tensor-Constant-f=(10)-expr=(cos(f) + sin(f))] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = 10, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _______________________________ test_math_functions[tensor-Constant-f=(10)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] ________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 10 typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________ test_math_functions[tensor-Constant-f=(10)-expr=(tanh(f) + cos(f) + sin(f))] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = 10 typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________ test_math_functions[tensor-Constant-f=(10)-expr=(1.0/tanh(f) + 1.0/f)] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________ test_math_functions[tensor-Constant-f=(10)-expr=(sqrt(f*f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = 10, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________ test_math_functions[tensor-Constant-f=(10)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] ___________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 10 typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________________ test_math_functions[tensor-Constant-f=(20)-expr=(f)] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = 20, typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________________ test_math_functions[tensor-Constant-f=(20)-expr=(2*f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = 20, typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________________________ test_math_functions[tensor-Constant-f=(20)-expr=(tanh(f))] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = 20, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[tensor-Constant-f=(20)-expr=(2 * tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = 20, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[tensor-Constant-f=(20)-expr=(f + tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = 20, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ______________________________________ test_math_functions[tensor-Constant-f=(20)-expr=(cos(f) + sin(f))] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = 20, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _______________________________ test_math_functions[tensor-Constant-f=(20)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] ________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 20 typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________ test_math_functions[tensor-Constant-f=(20)-expr=(tanh(f) + cos(f) + sin(f))] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = 20 typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________ test_math_functions[tensor-Constant-f=(20)-expr=(1.0/tanh(f) + 1.0/f)] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = 20, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________ test_math_functions[tensor-Constant-f=(20)-expr=(sqrt(f*f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = 20, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________ test_math_functions[tensor-Constant-f=(20)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] ___________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 20 typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________________ test_math_functions[tensor-Constant-f=(-1)-expr=(f)] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = -1, typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________________ test_math_functions[tensor-Constant-f=(-1)-expr=(2*f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = -1, typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________________________ test_math_functions[tensor-Constant-f=(-1)-expr=(tanh(f))] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = -1, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[tensor-Constant-f=(-1)-expr=(2 * tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = -1, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[tensor-Constant-f=(-1)-expr=(f + tanh(f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = -1, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ______________________________________ test_math_functions[tensor-Constant-f=(-1)-expr=(cos(f) + sin(f))] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = -1, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _______________________________ test_math_functions[tensor-Constant-f=(-1)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] ________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -1 typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________ test_math_functions[tensor-Constant-f=(-1)-expr=(tanh(f) + cos(f) + sin(f))] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = -1 typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________ test_math_functions[tensor-Constant-f=(-1)-expr=(1.0/tanh(f) + 1.0/f)] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________ test_math_functions[tensor-Constant-f=(-1)-expr=(sqrt(f*f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = -1, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________ test_math_functions[tensor-Constant-f=(-1)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] ___________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -1 typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________________ test_math_functions[tensor-Constant-f=(-10)-expr=(f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = -10, typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________________ test_math_functions[tensor-Constant-f=(-10)-expr=(2*f)] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = -10, typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________________________ test_math_functions[tensor-Constant-f=(-10)-expr=(tanh(f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = -10, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[tensor-Constant-f=(-10)-expr=(2 * tanh(f))] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = -10, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[tensor-Constant-f=(-10)-expr=(f + tanh(f))] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = -10, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ______________________________________ test_math_functions[tensor-Constant-f=(-10)-expr=(cos(f) + sin(f))] ______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = -10, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _______________________________ test_math_functions[tensor-Constant-f=(-10)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] _______________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -10 typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________ test_math_functions[tensor-Constant-f=(-10)-expr=(tanh(f) + cos(f) + sin(f))] _________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = -10 typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________ test_math_functions[tensor-Constant-f=(-10)-expr=(1.0/tanh(f) + 1.0/f)] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________ test_math_functions[tensor-Constant-f=(-10)-expr=(sqrt(f*f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = -10, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________ test_math_functions[tensor-Constant-f=(-10)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] __________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -10 typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________________ test_math_functions[tensor-Constant-f=(-20)-expr=(f)] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f', value = -20, typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________________ test_math_functions[tensor-Constant-f=(-20)-expr=(2*f)] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2*f', value = -20, typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________________________ test_math_functions[tensor-Constant-f=(-20)-expr=(tanh(f))] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f)', value = -20, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[tensor-Constant-f=(-20)-expr=(2 * tanh(f))] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '2 * tanh(f)', value = -20, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_math_functions[tensor-Constant-f=(-20)-expr=(f + tanh(f))] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'f + tanh(f)', value = -20, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ______________________________________ test_math_functions[tensor-Constant-f=(-20)-expr=(cos(f) + sin(f))] ______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f) + sin(f)', value = -20, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _______________________________ test_math_functions[tensor-Constant-f=(-20)-expr=(cos(f)*cos(f) + sin(f)*sin(f))] _______________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -20 typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________ test_math_functions[tensor-Constant-f=(-20)-expr=(tanh(f) + cos(f) + sin(f))] _________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'tanh(f) + cos(f) + sin(f)', value = -20 typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________ test_math_functions[tensor-Constant-f=(-20)-expr=(1.0/tanh(f) + 1.0/f)] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(f) + 1.0/f', value = -20, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________ test_math_functions[tensor-Constant-f=(-20)-expr=(sqrt(f*f))] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = 'sqrt(f*f)', value = -20, typ = 'Constant' fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________ test_math_functions[tensor-Constant-f=(-20)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))] __________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 33689), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -20 typ = 'Constant', fs_type = 'tensor' @pytest.mark.parametrize('expr', ['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], ids=lambda x: 'expr=(%s)' % x) @pytest.mark.parametrize('value', [1, 10, 20, -1, -10, -20], ids=lambda x: 'f=(%d)' % x) @pytest.mark.parametrize('typ', ['Function', 'Constant']) @pytest.mark.parametrize('fs_type', ['scalar', 'vector', 'tensor']) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'Function': if fs_type == 'vector': V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == 'tensor': V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == 'vector': f = dot(f, f) elif fs_type == 'tensor': f = inner(f, f) elif typ == 'Constant': if fs_type == 'vector': f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == 'tensor': f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) H = FunctionSpace(mesh, 'CG', 1) u = TrialFunction(H) v = TestFunction(H) C = eval(expr) a = (C)*u*v*dx L = (C)*v*dx actual = Function(H) > solve(a == L, actual) tests/regression/test_scaled_mass.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________ test_scalar_scaled_mass[triangle-DG(0)-Type=number-Scaling[-1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'number', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_scalar_scaled_mass[triangle-DG(0)-Type=number-Scaling[1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'number', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_scalar_scaled_mass[triangle-DG(0)-Type=number-Scaling[2]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'number', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_scalar_scaled_mass[triangle-DG(0)-Type=Constant-Scaling[-1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Constant', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_scalar_scaled_mass[triangle-DG(0)-Type=Constant-Scaling[1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Constant', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_scalar_scaled_mass[triangle-DG(0)-Type=Constant-Scaling[2]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Constant', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_scalar_scaled_mass[triangle-DG(0)-Type=Function-Scaling[-1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Function', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_scalar_scaled_mass[triangle-DG(0)-Type=Function-Scaling[1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Function', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_scalar_scaled_mass[triangle-DG(0)-Type=Function-Scaling[2]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Function', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_scalar_scaled_mass[triangle-DG(1)-Type=number-Scaling[-1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'number', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_scalar_scaled_mass[triangle-DG(1)-Type=number-Scaling[1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'number', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_scalar_scaled_mass[triangle-DG(1)-Type=number-Scaling[2]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'number', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_scalar_scaled_mass[triangle-DG(1)-Type=Constant-Scaling[-1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Constant', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_scalar_scaled_mass[triangle-DG(1)-Type=Constant-Scaling[1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Constant', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_scalar_scaled_mass[triangle-DG(1)-Type=Constant-Scaling[2]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Constant', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_scalar_scaled_mass[triangle-DG(1)-Type=Function-Scaling[-1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Function', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_scalar_scaled_mass[triangle-DG(1)-Type=Function-Scaling[1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Function', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_scalar_scaled_mass[triangle-DG(1)-Type=Function-Scaling[2]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Function', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_scalar_scaled_mass[triangle-DG(2)-Type=number-Scaling[-1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'number', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_scalar_scaled_mass[triangle-DG(2)-Type=number-Scaling[1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'number', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_scalar_scaled_mass[triangle-DG(2)-Type=number-Scaling[2]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'number', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_scalar_scaled_mass[triangle-DG(2)-Type=Constant-Scaling[-1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Constant', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_scalar_scaled_mass[triangle-DG(2)-Type=Constant-Scaling[1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Constant', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_scalar_scaled_mass[triangle-DG(2)-Type=Constant-Scaling[2]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Constant', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_scalar_scaled_mass[triangle-DG(2)-Type=Function-Scaling[-1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Function', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_scalar_scaled_mass[triangle-DG(2)-Type=Function-Scaling[1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Function', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_scalar_scaled_mass[triangle-DG(2)-Type=Function-Scaling[2]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Function', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[triangle-DG-(1)-Type=number-Scaling[-1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'number', degree = 1, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_vector_scaled_mass[triangle-DG-(1)-Type=number-Scaling[1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'number', degree = 1, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_vector_scaled_mass[triangle-DG-(1)-Type=number-Scaling[2]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'number', degree = 1, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_vector_scaled_mass[triangle-DG-(1)-Type=Constant-Scaling[-1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Constant', degree = 1, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[triangle-DG-(1)-Type=Constant-Scaling[1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Constant', degree = 1, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[triangle-DG-(1)-Type=Constant-Scaling[2]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Constant', degree = 1, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_vector_scaled_mass[triangle-DG-(1)-Type=Function-Scaling[-1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Function', degree = 1, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[triangle-DG-(1)-Type=Function-Scaling[1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Function', degree = 1, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[triangle-DG-(1)-Type=Function-Scaling[2]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Function', degree = 1, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[triangle-DG-(2)-Type=number-Scaling[-1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'number', degree = 2, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_vector_scaled_mass[triangle-DG-(2)-Type=number-Scaling[1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'number', degree = 2, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_vector_scaled_mass[triangle-DG-(2)-Type=number-Scaling[2]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'number', degree = 2, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_vector_scaled_mass[triangle-DG-(2)-Type=Constant-Scaling[-1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Constant', degree = 2, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[triangle-DG-(2)-Type=Constant-Scaling[1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Constant', degree = 2, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[triangle-DG-(2)-Type=Constant-Scaling[2]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Constant', degree = 2, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_vector_scaled_mass[triangle-DG-(2)-Type=Function-Scaling[-1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Function', degree = 2, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[triangle-DG-(2)-Type=Function-Scaling[1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Function', degree = 2, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[triangle-DG-(2)-Type=Function-Scaling[2]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Function', degree = 2, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[triangle-RT-(1)-Type=number-Scaling[-1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'number', degree = 1, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_vector_scaled_mass[triangle-RT-(1)-Type=number-Scaling[1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'number', degree = 1, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_vector_scaled_mass[triangle-RT-(1)-Type=number-Scaling[2]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'number', degree = 1, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_vector_scaled_mass[triangle-RT-(1)-Type=Constant-Scaling[-1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Constant', degree = 1, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[triangle-RT-(1)-Type=Constant-Scaling[1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Constant', degree = 1, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[triangle-RT-(1)-Type=Constant-Scaling[2]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Constant', degree = 1, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_vector_scaled_mass[triangle-RT-(1)-Type=Function-Scaling[-1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Function', degree = 1, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[triangle-RT-(1)-Type=Function-Scaling[1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Function', degree = 1, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[triangle-RT-(1)-Type=Function-Scaling[2]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Function', degree = 1, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[triangle-RT-(2)-Type=number-Scaling[-1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'number', degree = 2, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_vector_scaled_mass[triangle-RT-(2)-Type=number-Scaling[1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'number', degree = 2, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_vector_scaled_mass[triangle-RT-(2)-Type=number-Scaling[2]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'number', degree = 2, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_vector_scaled_mass[triangle-RT-(2)-Type=Constant-Scaling[-1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Constant', degree = 2, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[triangle-RT-(2)-Type=Constant-Scaling[1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Constant', degree = 2, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[triangle-RT-(2)-Type=Constant-Scaling[2]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Constant', degree = 2, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_vector_scaled_mass[triangle-RT-(2)-Type=Function-Scaling[-1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Function', degree = 2, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[triangle-RT-(2)-Type=Function-Scaling[1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Function', degree = 2, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[triangle-RT-(2)-Type=Function-Scaling[2]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Function', degree = 2, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[triangle-BDM-(1)-Type=number-Scaling[-1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'number', degree = 1, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[triangle-BDM-(1)-Type=number-Scaling[1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'number', degree = 1, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[triangle-BDM-(1)-Type=number-Scaling[2]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'number', degree = 1, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_vector_scaled_mass[triangle-BDM-(1)-Type=Constant-Scaling[-1]] ______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Constant', degree = 1, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_vector_scaled_mass[triangle-BDM-(1)-Type=Constant-Scaling[1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Constant', degree = 1, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_vector_scaled_mass[triangle-BDM-(1)-Type=Constant-Scaling[2]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Constant', degree = 1, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_vector_scaled_mass[triangle-BDM-(1)-Type=Function-Scaling[-1]] ______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Function', degree = 1, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_vector_scaled_mass[triangle-BDM-(1)-Type=Function-Scaling[1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Function', degree = 1, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_vector_scaled_mass[triangle-BDM-(1)-Type=Function-Scaling[2]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Function', degree = 1, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[triangle-BDM-(2)-Type=number-Scaling[-1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'number', degree = 2, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[triangle-BDM-(2)-Type=number-Scaling[1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'number', degree = 2, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[triangle-BDM-(2)-Type=number-Scaling[2]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'number', degree = 2, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_vector_scaled_mass[triangle-BDM-(2)-Type=Constant-Scaling[-1]] ______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Constant', degree = 2, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_vector_scaled_mass[triangle-BDM-(2)-Type=Constant-Scaling[1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Constant', degree = 2, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_vector_scaled_mass[triangle-BDM-(2)-Type=Constant-Scaling[2]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Constant', degree = 2, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_vector_scaled_mass[triangle-BDM-(2)-Type=Function-Scaling[-1]] ______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Function', degree = 2, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_vector_scaled_mass[triangle-BDM-(2)-Type=Function-Scaling[1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Function', degree = 2, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_vector_scaled_mass[triangle-BDM-(2)-Type=Function-Scaling[2]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Function', degree = 2, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_vector_scaled_mass[triangle-N1curl-(1)-Type=number-Scaling[-1]] ______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'number', degree = 1, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_vector_scaled_mass[triangle-N1curl-(1)-Type=number-Scaling[1]] ______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'number', degree = 1, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_vector_scaled_mass[triangle-N1curl-(1)-Type=number-Scaling[2]] ______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'number', degree = 1, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_vector_scaled_mass[triangle-N1curl-(1)-Type=Constant-Scaling[-1]] _____________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Constant', degree = 1, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_vector_scaled_mass[triangle-N1curl-(1)-Type=Constant-Scaling[1]] _____________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Constant', degree = 1, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_vector_scaled_mass[triangle-N1curl-(1)-Type=Constant-Scaling[2]] _____________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Constant', degree = 1, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_vector_scaled_mass[triangle-N1curl-(1)-Type=Function-Scaling[-1]] _____________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Function', degree = 1, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_vector_scaled_mass[triangle-N1curl-(1)-Type=Function-Scaling[1]] _____________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Function', degree = 1, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_vector_scaled_mass[triangle-N1curl-(1)-Type=Function-Scaling[2]] _____________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Function', degree = 1, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_vector_scaled_mass[triangle-N1curl-(2)-Type=number-Scaling[-1]] ______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'number', degree = 2, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_vector_scaled_mass[triangle-N1curl-(2)-Type=number-Scaling[1]] ______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'number', degree = 2, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_vector_scaled_mass[triangle-N1curl-(2)-Type=number-Scaling[2]] ______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'number', degree = 2, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_vector_scaled_mass[triangle-N1curl-(2)-Type=Constant-Scaling[-1]] _____________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Constant', degree = 2, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_vector_scaled_mass[triangle-N1curl-(2)-Type=Constant-Scaling[1]] _____________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Constant', degree = 2, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_vector_scaled_mass[triangle-N1curl-(2)-Type=Constant-Scaling[2]] _____________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Constant', degree = 2, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_vector_scaled_mass[triangle-N1curl-(2)-Type=Function-Scaling[-1]] _____________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Function', degree = 2, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_vector_scaled_mass[triangle-N1curl-(2)-Type=Function-Scaling[1]] _____________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Function', degree = 2, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_vector_scaled_mass[triangle-N1curl-(2)-Type=Function-Scaling[2]] _____________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Function', degree = 2, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_vector_scaled_mass[triangle-N2curl-(1)-Type=number-Scaling[-1]] ______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'number', degree = 1, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_vector_scaled_mass[triangle-N2curl-(1)-Type=number-Scaling[1]] ______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'number', degree = 1, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_vector_scaled_mass[triangle-N2curl-(1)-Type=number-Scaling[2]] ______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'number', degree = 1, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_vector_scaled_mass[triangle-N2curl-(1)-Type=Constant-Scaling[-1]] _____________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Constant', degree = 1, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_vector_scaled_mass[triangle-N2curl-(1)-Type=Constant-Scaling[1]] _____________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Constant', degree = 1, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_vector_scaled_mass[triangle-N2curl-(1)-Type=Constant-Scaling[2]] _____________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Constant', degree = 1, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_vector_scaled_mass[triangle-N2curl-(1)-Type=Function-Scaling[-1]] _____________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Function', degree = 1, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_vector_scaled_mass[triangle-N2curl-(1)-Type=Function-Scaling[1]] _____________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Function', degree = 1, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_vector_scaled_mass[triangle-N2curl-(1)-Type=Function-Scaling[2]] _____________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Function', degree = 1, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_vector_scaled_mass[triangle-N2curl-(2)-Type=number-Scaling[-1]] ______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'number', degree = 2, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_vector_scaled_mass[triangle-N2curl-(2)-Type=number-Scaling[1]] ______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'number', degree = 2, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_vector_scaled_mass[triangle-N2curl-(2)-Type=number-Scaling[2]] ______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'number', degree = 2, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_vector_scaled_mass[triangle-N2curl-(2)-Type=Constant-Scaling[-1]] _____________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Constant', degree = 2, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_vector_scaled_mass[triangle-N2curl-(2)-Type=Constant-Scaling[1]] _____________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Constant', degree = 2, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_vector_scaled_mass[triangle-N2curl-(2)-Type=Constant-Scaling[2]] _____________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Constant', degree = 2, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_vector_scaled_mass[triangle-N2curl-(2)-Type=Function-Scaling[-1]] _____________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Function', degree = 2, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_vector_scaled_mass[triangle-N2curl-(2)-Type=Function-Scaling[1]] _____________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Function', degree = 2, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_vector_scaled_mass[triangle-N2curl-(2)-Type=Function-Scaling[2]] _____________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Function', degree = 2, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_tensor_scaled_mass[triangle-(0)-Type=number-Scaling[-1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'number', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_tensor_scaled_mass[triangle-(0)-Type=number-Scaling[1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'number', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_tensor_scaled_mass[triangle-(0)-Type=number-Scaling[2]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'number', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_tensor_scaled_mass[triangle-(0)-Type=Constant-Scaling[-1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Constant', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_tensor_scaled_mass[triangle-(0)-Type=Constant-Scaling[1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Constant', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_tensor_scaled_mass[triangle-(0)-Type=Constant-Scaling[2]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Constant', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_tensor_scaled_mass[triangle-(0)-Type=Function-Scaling[-1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Function', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:170: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_tensor_scaled_mass[triangle-(0)-Type=Function-Scaling[1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Function', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:170: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_tensor_scaled_mass[triangle-(0)-Type=Function-Scaling[2]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Function', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:170: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_tensor_scaled_mass[triangle-(1)-Type=number-Scaling[-1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'number', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_tensor_scaled_mass[triangle-(1)-Type=number-Scaling[1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'number', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_tensor_scaled_mass[triangle-(1)-Type=number-Scaling[2]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'number', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_tensor_scaled_mass[triangle-(1)-Type=Constant-Scaling[-1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Constant', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_tensor_scaled_mass[triangle-(1)-Type=Constant-Scaling[1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Constant', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_tensor_scaled_mass[triangle-(1)-Type=Constant-Scaling[2]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Constant', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_tensor_scaled_mass[triangle-(1)-Type=Function-Scaling[-1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Function', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:170: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_tensor_scaled_mass[triangle-(1)-Type=Function-Scaling[1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Function', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:170: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_tensor_scaled_mass[triangle-(1)-Type=Function-Scaling[2]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Function', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:170: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_tensor_scaled_mass[triangle-(2)-Type=number-Scaling[-1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'number', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_tensor_scaled_mass[triangle-(2)-Type=number-Scaling[1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'number', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_tensor_scaled_mass[triangle-(2)-Type=number-Scaling[2]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'number', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_tensor_scaled_mass[triangle-(2)-Type=Constant-Scaling[-1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Constant', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_tensor_scaled_mass[triangle-(2)-Type=Constant-Scaling[1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Constant', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_tensor_scaled_mass[triangle-(2)-Type=Constant-Scaling[2]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Constant', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_tensor_scaled_mass[triangle-(2)-Type=Function-Scaling[-1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = -1, typ = 'Function', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:170: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_tensor_scaled_mass[triangle-(2)-Type=Function-Scaling[1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 1, typ = 'Function', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:170: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_tensor_scaled_mass[triangle-(2)-Type=Function-Scaling[2]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34681), value = 2, typ = 'Function', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:170: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_scalar_scaled_mass[tet-DG(0)-Type=number-Scaling[-1]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'number', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_scalar_scaled_mass[tet-DG(0)-Type=number-Scaling[1]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'number', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_scalar_scaled_mass[tet-DG(0)-Type=number-Scaling[2]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'number', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_scalar_scaled_mass[tet-DG(0)-Type=Constant-Scaling[-1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Constant', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_scalar_scaled_mass[tet-DG(0)-Type=Constant-Scaling[1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Constant', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_scalar_scaled_mass[tet-DG(0)-Type=Constant-Scaling[2]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Constant', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_scalar_scaled_mass[tet-DG(0)-Type=Function-Scaling[-1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Function', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_scalar_scaled_mass[tet-DG(0)-Type=Function-Scaling[1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Function', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_scalar_scaled_mass[tet-DG(0)-Type=Function-Scaling[2]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Function', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_scalar_scaled_mass[tet-DG(1)-Type=number-Scaling[-1]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'number', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_scalar_scaled_mass[tet-DG(1)-Type=number-Scaling[1]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'number', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_scalar_scaled_mass[tet-DG(1)-Type=number-Scaling[2]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'number', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_scalar_scaled_mass[tet-DG(1)-Type=Constant-Scaling[-1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Constant', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_scalar_scaled_mass[tet-DG(1)-Type=Constant-Scaling[1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Constant', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_scalar_scaled_mass[tet-DG(1)-Type=Constant-Scaling[2]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Constant', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_scalar_scaled_mass[tet-DG(1)-Type=Function-Scaling[-1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Function', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_scalar_scaled_mass[tet-DG(1)-Type=Function-Scaling[1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Function', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_scalar_scaled_mass[tet-DG(1)-Type=Function-Scaling[2]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Function', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_scalar_scaled_mass[tet-DG(2)-Type=number-Scaling[-1]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'number', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_scalar_scaled_mass[tet-DG(2)-Type=number-Scaling[1]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'number', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_scalar_scaled_mass[tet-DG(2)-Type=number-Scaling[2]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'number', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_scalar_scaled_mass[tet-DG(2)-Type=Constant-Scaling[-1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Constant', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_scalar_scaled_mass[tet-DG(2)-Type=Constant-Scaling[1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Constant', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_scalar_scaled_mass[tet-DG(2)-Type=Constant-Scaling[2]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Constant', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = FunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(u*v*dx) tests/regression/test_scaled_mass.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_scalar_scaled_mass[tet-DG(2)-Type=Function-Scaling[-1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Function', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_scalar_scaled_mass[tet-DG(2)-Type=Function-Scaling[1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Function', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_scalar_scaled_mass[tet-DG(2)-Type=Function-Scaling[2]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Function', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "DG(%d)" % x) def test_scalar_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_vector_scaled_mass[tet-DG-(1)-Type=number-Scaling[-1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'number', degree = 1, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_vector_scaled_mass[tet-DG-(1)-Type=number-Scaling[1]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'number', degree = 1, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_vector_scaled_mass[tet-DG-(1)-Type=number-Scaling[2]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'number', degree = 1, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-DG-(1)-Type=Constant-Scaling[-1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Constant', degree = 1, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-DG-(1)-Type=Constant-Scaling[1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Constant', degree = 1, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-DG-(1)-Type=Constant-Scaling[2]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Constant', degree = 1, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-DG-(1)-Type=Function-Scaling[-1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Function', degree = 1, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-DG-(1)-Type=Function-Scaling[1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Function', degree = 1, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-DG-(1)-Type=Function-Scaling[2]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Function', degree = 1, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_vector_scaled_mass[tet-DG-(2)-Type=number-Scaling[-1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'number', degree = 2, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_vector_scaled_mass[tet-DG-(2)-Type=number-Scaling[1]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'number', degree = 2, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_vector_scaled_mass[tet-DG-(2)-Type=number-Scaling[2]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'number', degree = 2, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-DG-(2)-Type=Constant-Scaling[-1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Constant', degree = 2, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-DG-(2)-Type=Constant-Scaling[1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Constant', degree = 2, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-DG-(2)-Type=Constant-Scaling[2]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Constant', degree = 2, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-DG-(2)-Type=Function-Scaling[-1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Function', degree = 2, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-DG-(2)-Type=Function-Scaling[1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Function', degree = 2, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-DG-(2)-Type=Function-Scaling[2]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Function', degree = 2, space = 'DG' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_vector_scaled_mass[tet-RT-(1)-Type=number-Scaling[-1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'number', degree = 1, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_vector_scaled_mass[tet-RT-(1)-Type=number-Scaling[1]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'number', degree = 1, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_vector_scaled_mass[tet-RT-(1)-Type=number-Scaling[2]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'number', degree = 1, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-RT-(1)-Type=Constant-Scaling[-1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Constant', degree = 1, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-RT-(1)-Type=Constant-Scaling[1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Constant', degree = 1, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-RT-(1)-Type=Constant-Scaling[2]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Constant', degree = 1, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-RT-(1)-Type=Function-Scaling[-1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Function', degree = 1, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-RT-(1)-Type=Function-Scaling[1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Function', degree = 1, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-RT-(1)-Type=Function-Scaling[2]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Function', degree = 1, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_vector_scaled_mass[tet-RT-(2)-Type=number-Scaling[-1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'number', degree = 2, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_vector_scaled_mass[tet-RT-(2)-Type=number-Scaling[1]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'number', degree = 2, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_vector_scaled_mass[tet-RT-(2)-Type=number-Scaling[2]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'number', degree = 2, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-RT-(2)-Type=Constant-Scaling[-1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Constant', degree = 2, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-RT-(2)-Type=Constant-Scaling[1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Constant', degree = 2, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-RT-(2)-Type=Constant-Scaling[2]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Constant', degree = 2, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-RT-(2)-Type=Function-Scaling[-1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Function', degree = 2, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-RT-(2)-Type=Function-Scaling[1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Function', degree = 2, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-RT-(2)-Type=Function-Scaling[2]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Function', degree = 2, space = 'RT' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-BDM-(1)-Type=number-Scaling[-1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'number', degree = 1, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_vector_scaled_mass[tet-BDM-(1)-Type=number-Scaling[1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'number', degree = 1, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_vector_scaled_mass[tet-BDM-(1)-Type=number-Scaling[2]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'number', degree = 1, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_vector_scaled_mass[tet-BDM-(1)-Type=Constant-Scaling[-1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Constant', degree = 1, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-BDM-(1)-Type=Constant-Scaling[1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Constant', degree = 1, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-BDM-(1)-Type=Constant-Scaling[2]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Constant', degree = 1, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_vector_scaled_mass[tet-BDM-(1)-Type=Function-Scaling[-1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Function', degree = 1, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-BDM-(1)-Type=Function-Scaling[1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Function', degree = 1, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-BDM-(1)-Type=Function-Scaling[2]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Function', degree = 1, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-BDM-(2)-Type=number-Scaling[-1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'number', degree = 2, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_vector_scaled_mass[tet-BDM-(2)-Type=number-Scaling[1]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'number', degree = 2, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_vector_scaled_mass[tet-BDM-(2)-Type=number-Scaling[2]] __________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'number', degree = 2, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_vector_scaled_mass[tet-BDM-(2)-Type=Constant-Scaling[-1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Constant', degree = 2, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-BDM-(2)-Type=Constant-Scaling[1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Constant', degree = 2, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-BDM-(2)-Type=Constant-Scaling[2]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Constant', degree = 2, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_vector_scaled_mass[tet-BDM-(2)-Type=Function-Scaling[-1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Function', degree = 2, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-BDM-(2)-Type=Function-Scaling[1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Function', degree = 2, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_vector_scaled_mass[tet-BDM-(2)-Type=Function-Scaling[2]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Function', degree = 2, space = 'BDM' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_vector_scaled_mass[tet-N1curl-(1)-Type=number-Scaling[-1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'number', degree = 1, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_vector_scaled_mass[tet-N1curl-(1)-Type=number-Scaling[1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'number', degree = 1, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_vector_scaled_mass[tet-N1curl-(1)-Type=number-Scaling[2]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'number', degree = 1, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[tet-N1curl-(1)-Type=Constant-Scaling[-1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Constant', degree = 1, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[tet-N1curl-(1)-Type=Constant-Scaling[1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Constant', degree = 1, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[tet-N1curl-(1)-Type=Constant-Scaling[2]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Constant', degree = 1, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[tet-N1curl-(1)-Type=Function-Scaling[-1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Function', degree = 1, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[tet-N1curl-(1)-Type=Function-Scaling[1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Function', degree = 1, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[tet-N1curl-(1)-Type=Function-Scaling[2]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Function', degree = 1, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_vector_scaled_mass[tet-N1curl-(2)-Type=number-Scaling[-1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'number', degree = 2, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_vector_scaled_mass[tet-N1curl-(2)-Type=number-Scaling[1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'number', degree = 2, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_vector_scaled_mass[tet-N1curl-(2)-Type=number-Scaling[2]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'number', degree = 2, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[tet-N1curl-(2)-Type=Constant-Scaling[-1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Constant', degree = 2, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[tet-N1curl-(2)-Type=Constant-Scaling[1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Constant', degree = 2, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[tet-N1curl-(2)-Type=Constant-Scaling[2]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Constant', degree = 2, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[tet-N1curl-(2)-Type=Function-Scaling[-1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Function', degree = 2, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[tet-N1curl-(2)-Type=Function-Scaling[1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Function', degree = 2, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[tet-N1curl-(2)-Type=Function-Scaling[2]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Function', degree = 2, space = 'N1curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_vector_scaled_mass[tet-N2curl-(1)-Type=number-Scaling[-1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'number', degree = 1, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_vector_scaled_mass[tet-N2curl-(1)-Type=number-Scaling[1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'number', degree = 1, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_vector_scaled_mass[tet-N2curl-(1)-Type=number-Scaling[2]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'number', degree = 1, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[tet-N2curl-(1)-Type=Constant-Scaling[-1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Constant', degree = 1, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[tet-N2curl-(1)-Type=Constant-Scaling[1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Constant', degree = 1, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[tet-N2curl-(1)-Type=Constant-Scaling[2]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Constant', degree = 1, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[tet-N2curl-(1)-Type=Function-Scaling[-1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Function', degree = 1, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[tet-N2curl-(1)-Type=Function-Scaling[1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Function', degree = 1, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[tet-N2curl-(1)-Type=Function-Scaling[2]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Function', degree = 1, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_vector_scaled_mass[tet-N2curl-(2)-Type=number-Scaling[-1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'number', degree = 2, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_vector_scaled_mass[tet-N2curl-(2)-Type=number-Scaling[1]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'number', degree = 2, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_vector_scaled_mass[tet-N2curl-(2)-Type=number-Scaling[2]] _________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'number', degree = 2, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[tet-N2curl-(2)-Type=Constant-Scaling[-1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Constant', degree = 2, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[tet-N2curl-(2)-Type=Constant-Scaling[1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Constant', degree = 2, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[tet-N2curl-(2)-Type=Constant-Scaling[2]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Constant', degree = 2, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) if space == "DG": V = VectorFunctionSpace(m, space, degree) else: V = FunctionSpace(m, space, degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(dot(u, v)*dx) tests/regression/test_scaled_mass.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[tet-N2curl-(2)-Type=Function-Scaling[-1]] _______________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Function', degree = 2, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[tet-N2curl-(2)-Type=Function-Scaling[1]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Function', degree = 2, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_vector_scaled_mass[tet-N2curl-(2)-Type=Function-Scaling[2]] ________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Function', degree = 2, space = 'N2curl' @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [1, 2], ids=lambda x: "(%d)" % x) @pytest.mark.parametrize("space", ["DG", "RT", "BDM", "N1curl", "N2curl"]) def test_vector_scaled_mass(m, value, typ, degree, space): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_tensor_scaled_mass[tet-(0)-Type=number-Scaling[-1]] ____________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'number', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_tensor_scaled_mass[tet-(0)-Type=number-Scaling[1]] ____________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'number', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_tensor_scaled_mass[tet-(0)-Type=number-Scaling[2]] ____________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'number', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_tensor_scaled_mass[tet-(0)-Type=Constant-Scaling[-1]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Constant', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_tensor_scaled_mass[tet-(0)-Type=Constant-Scaling[1]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Constant', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_tensor_scaled_mass[tet-(0)-Type=Constant-Scaling[2]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Constant', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_tensor_scaled_mass[tet-(0)-Type=Function-Scaling[-1]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Function', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:170: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_tensor_scaled_mass[tet-(0)-Type=Function-Scaling[1]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Function', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:170: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_tensor_scaled_mass[tet-(0)-Type=Function-Scaling[2]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Function', degree = 0 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:170: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_tensor_scaled_mass[tet-(1)-Type=number-Scaling[-1]] ____________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'number', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_tensor_scaled_mass[tet-(1)-Type=number-Scaling[1]] ____________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'number', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_tensor_scaled_mass[tet-(1)-Type=number-Scaling[2]] ____________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'number', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_tensor_scaled_mass[tet-(1)-Type=Constant-Scaling[-1]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Constant', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_tensor_scaled_mass[tet-(1)-Type=Constant-Scaling[1]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Constant', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_tensor_scaled_mass[tet-(1)-Type=Constant-Scaling[2]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Constant', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_tensor_scaled_mass[tet-(1)-Type=Function-Scaling[-1]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Function', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:170: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_tensor_scaled_mass[tet-(1)-Type=Function-Scaling[1]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Function', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:170: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_tensor_scaled_mass[tet-(1)-Type=Function-Scaling[2]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Function', degree = 1 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:170: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_tensor_scaled_mass[tet-(2)-Type=number-Scaling[-1]] ____________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'number', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_tensor_scaled_mass[tet-(2)-Type=number-Scaling[1]] ____________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'number', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_tensor_scaled_mass[tet-(2)-Type=number-Scaling[2]] ____________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'number', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_tensor_scaled_mass[tet-(2)-Type=Constant-Scaling[-1]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Constant', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_tensor_scaled_mass[tet-(2)-Type=Constant-Scaling[1]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Constant', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_tensor_scaled_mass[tet-(2)-Type=Constant-Scaling[2]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Constant', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) c.assign(value) V = TensorFunctionSpace(m, "DG", degree) u = TrialFunction(V) v = TestFunction(V) > mass = assemble(inner(u, v)*dx) tests/regression/test_scaled_mass.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_tensor_scaled_mass[tet-(2)-Type=Function-Scaling[-1]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = -1, typ = 'Function', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:170: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_tensor_scaled_mass[tet-(2)-Type=Function-Scaling[1]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 1, typ = 'Function', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:170: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_tensor_scaled_mass[tet-(2)-Type=Function-Scaling[2]] ___________________________________________ m = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34779), value = 2, typ = 'Function', degree = 2 @pytest.mark.parametrize("value", [-1, 1, 2], ids=lambda x: "Scaling[%d]" % x) @pytest.mark.parametrize("typ", ["number", "Constant", "Function"], ids=lambda x: "Type=%s" % x) @pytest.mark.parametrize("degree", [0, 1, 2], ids=lambda x: "(%d)" % x) def test_tensor_scaled_mass(m, value, typ, degree): if typ == "number": c = value elif typ == "Constant": c = Constant(value) elif typ == "Function": V = FunctionSpace(m, "DG", 0) c = Function(V) > c.assign(value) tests/regression/test_scaled_mass.py:170: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________________ test_laplace_parallel _____________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_la_invalid_matrix_type __________________________________________________________ a = Form([Integral(Product(Argument(WithGeometry(FunctionSpace(, Fin...1, None)), 'cell', Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34898), 'everywhere', {}, None)]) L = Form([Integral(Product(Argument(WithGeometry(FunctionSpace(, Fin..., 53475)), 'cell', Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34898), 'everywhere', {}, None)]) f = Coefficient(WithGeometry(FunctionSpace(, FiniteElement('Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34898)), 53475) def test_la_invalid_matrix_type(a, L, f): with pytest.raises(TypeError): > solve(a, f, assemble(L)) tests/regression/test_solver_error_checking.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________________ test_la_invalid_function_type _________________________________________________________ a = Form([Integral(Product(Argument(WithGeometry(FunctionSpace(, Fin...1, None)), 'cell', Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34903), 'everywhere', {}, None)]) L = Form([Integral(Product(Argument(WithGeometry(FunctionSpace(, Fin..., 53483)), 'cell', Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34903), 'everywhere', {}, None)]) f = Coefficient(WithGeometry(FunctionSpace(, FiniteElement('Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34903)), 53483) def test_la_invalid_function_type(a, L, f): with pytest.raises(TypeError): > solve(assemble(a), f, L) tests/regression/test_solver_error_checking.py:72: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________________ test_la_invalid_solution_type _________________________________________________________ a = Form([Integral(Product(Argument(WithGeometry(FunctionSpace(, Fin...1, None)), 'cell', Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34906), 'everywhere', {}, None)]) L = Form([Integral(Product(Argument(WithGeometry(FunctionSpace(, Fin..., 53487)), 'cell', Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 34906), 'everywhere', {}, None)]) c = Constant(FiniteElement('Real', triangle, 0), 53488) def test_la_invalid_solution_type(a, L, c): with pytest.raises(TypeError): > solve(assemble(a), c, assemble(L)) tests/regression/test_solver_error_checking.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________________ test_options_database_cleared _________________________________________________________ def test_options_database_cleared(): opts = PETSc.Options() expect = len(opts.getAll()) mesh = UnitIntervalMesh(1) V = FunctionSpace(mesh, "DG", 0) u = TrialFunction(V) v = TestFunction(V) > A = assemble(u*v*dx) tests/regression/test_solvers_options_prefix.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_petsc_options_cleared ___________________________________________________________ a_L_out = (Form([Integral(Product(Argument(WithGeometry(FunctionSpace(, Fi...e', tetrahedron, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34964)), 53577)) def test_petsc_options_cleared(a_L_out): a, L, out = a_L_out opts = PETSc.Options() original = {} original.update(opts.getAll()) > solve(a == L, out, solver_parameters={'foo': 'bar'}) tests/regression/test_solving_interface.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ____________________________________________________________ test_linear_solver_gced ____________________________________________________________ a_L_out = (Form([Integral(Product(Argument(WithGeometry(FunctionSpace(, Fi...e', tetrahedron, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34971)), 53589)) def test_linear_solver_gced(a_L_out): a, L, out = a_L_out gc.collect() before = howmany(LinearVariationalSolver) > solve(a == L, out) tests/regression/test_solving_interface.py:55: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:267: in solve solving_utils.check_snes_convergence(self.snes) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ snes = def check_snes_convergence(snes): r = snes.getConvergedReason() try: reason = SNESReasons[r] inner = False except KeyError: r = snes.getKSP().getConvergedReason() try: inner = True reason = KSPReasons[r] except KeyError: reason = "unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason" if r < 0: if inner: msg = "Inner linear solve failed to converge after %d iterations with reason: %s" % \ (snes.getKSP().getIterationNumber(), reason) else: msg = reason raise ConvergenceError(r"""Nonlinear solve failed to converge after %d nonlinear iterations. Reason: > %s""" % (snes.getIterationNumber(), msg)) E firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations. E Reason: E Inner linear solve failed to converge after 0 iterations with reason: DIVERGED_PCSETUP_FAILED firedrake/solving_utils.py:44: ConvergenceError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 304, in petsc4py.PETSc.SNES_Jacobian File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 294, in form_jacobian ctx._assemble_jac() File "/home/simone/firedrake/src/PyOP2/pyop2/utils.py", line 62, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 359, in _assemble_jac mat_type=self.mat_type) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 158, in create_assembly_callable loops = tuple(loops) File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 606, in _assemble yield tensor.assemble() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3379, in assemble read=True, write=True).enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set __________________________________________________________ test_assembled_solver_gced ___________________________________________________________ a_L_out = (Form([Integral(Product(Argument(WithGeometry(FunctionSpace(, Fi...e', tetrahedron, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34978)), 53601)) def test_assembled_solver_gced(a_L_out): a, L, out = a_L_out > A = assemble(a) tests/regression/test_solving_interface.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_nonlinear_solver_gced ___________________________________________________________ a_L_out = (Form([Integral(Product(Argument(WithGeometry(FunctionSpace(, Fi...e', tetrahedron, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 34982)), 53607)) def test_nonlinear_solver_gced(a_L_out): a, L, out = a_L_out gc.collect() before = howmany(NonlinearVariationalSolver) F = action(a, out) - L solve(F == 0, out) out.dat.data_ro # force evaluation gc.collect() after = howmany(NonlinearVariationalSolver) > assert before == after E assert 0 == 1 tests/regression/test_solving_interface.py:94: AssertionError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _________________________________________________________ test_linear_solves_equivalent _________________________________________________________ def test_linear_solves_equivalent(): """solve(a == L, out) should return the same as solving with the assembled objects. This relies on two different code paths agreeing on the same set of solver parameters.""" mesh = UnitSquareMesh(50, 50) V = FunctionSpace(mesh, "CG", 1) f = Function(V) > f.assign(1) tests/regression/test_solving_interface.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_constant_jacobian_lvs ___________________________________________________________ def test_constant_jacobian_lvs(): mesh = UnitSquareMesh(2, 2) V = FunctionSpace(mesh, "CG", 1) u = TrialFunction(V) v = TestFunction(V) q = Function(V) > q.assign(1) tests/regression/test_solving_interface.py:154: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________________ test_assemble_split_derivative _________________________________________________________ def test_assemble_split_derivative(): """Assemble the derivative of a form with a zero block.""" mesh = UnitSquareMesh(1, 1) V1 = FunctionSpace(mesh, "BDM", 1, name="V") V2 = FunctionSpace(mesh, "DG", 0, name="P") W = V1 * V2 x = Function(W) u, p = split(x) v, q = TestFunctions(W) F = (inner(u, v) + v[1]*p)*dx > assert assemble(derivative(F, x)) tests/regression/test_split.py:19: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________________ test_split_function_derivative _________________________________________________________ def test_split_function_derivative(): mesh = UnitSquareMesh(1, 1) V = FunctionSpace(mesh, "DG", 0) W = V*V f = Function(W) u, p = f.split() > f.assign(1) tests/regression/test_split.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________________ test_split_communicators ____________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________________ test_left_to_right[triangle] __________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35030) DG0 = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', triangle, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35030)) W = WithGeometry(FunctionSpace(, FiniteElement('Brezzi-Douglas-Marini', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35030)) def test_left_to_right(mesh, DG0, W): > run_left_to_right(mesh, DG0, W) tests/regression/test_steady_advection_2D.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_steady_advection_2D.py:37: in run_left_to_right u0 = project(velocity, W) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:158: in apply_massinv return self.solver.solve ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:144: in solver return firedrake.LinearSolver(self.A, solver_parameters=self.solver_parameters) ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:139: in A form_compiler_parameters=self.form_compiler_parameters) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________ test_left_to_right[quadrilateral] _______________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35033) DG0 = WithGeometry(FunctionSpace(, FiniteElement('DQ', quadrilateral, 0), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35033)) W = WithGeometry(FunctionSpace(, FiniteElement('RTCF', quadrilateral, 1), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35033)) def test_left_to_right(mesh, DG0, W): > run_left_to_right(mesh, DG0, W) tests/regression/test_steady_advection_2D.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_steady_advection_2D.py:37: in run_left_to_right u0 = project(velocity, W) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:158: in apply_massinv return self.solver.solve ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:144: in solver return firedrake.LinearSolver(self.A, solver_parameters=self.solver_parameters) ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:139: in A form_compiler_parameters=self.form_compiler_parameters) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________ test_left_to_right_parallel[triangle] _____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________ test_left_to_right_parallel[quadrilateral] ___________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________________ test_up_to_down[triangle] ___________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35040) DG1 = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35040)) W = WithGeometry(FunctionSpace(, FiniteElement('Brezzi-Douglas-Marini', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35040)) def test_up_to_down(mesh, DG1, W): > run_up_to_down(mesh, DG1, W) tests/regression/test_steady_advection_2D.py:104: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_steady_advection_2D.py:77: in run_up_to_down u0 = project(velocity, W) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:158: in apply_massinv return self.solver.solve ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:144: in solver return firedrake.LinearSolver(self.A, solver_parameters=self.solver_parameters) ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:139: in A form_compiler_parameters=self.form_compiler_parameters) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________________ test_up_to_down[quadrilateral] _________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35043) DG1 = WithGeometry(FunctionSpace(, FiniteElement('DQ', quadrilateral, 1), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35043)) W = WithGeometry(FunctionSpace(, FiniteElement('RTCF', quadrilateral, 1), name=None), Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35043)) def test_up_to_down(mesh, DG1, W): > run_up_to_down(mesh, DG1, W) tests/regression/test_steady_advection_2D.py:104: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_steady_advection_2D.py:77: in run_up_to_down u0 = project(velocity, W) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:158: in apply_massinv return self.solver.solve ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:144: in solver return firedrake.LinearSolver(self.A, solver_parameters=self.solver_parameters) ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:139: in A form_compiler_parameters=self.form_compiler_parameters) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________________ test_up_to_down_parallel[triangle] _______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________ test_up_to_down_parallel[quadrilateral] ____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________________ test_3d_near_to_far ______________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 35050) DG0 = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', tetrahedron, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 35050)) W = WithGeometry(FunctionSpace(, FiniteElement('Raviart-Thomas', tetrahedron, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 35050)) def test_3d_near_to_far(mesh, DG0, W): > run_near_to_far(mesh, DG0, W) tests/regression/test_steady_advection_3D.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_steady_advection_3D.py:33: in run_near_to_far u0 = project(velocity, W) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:158: in apply_massinv return self.solver.solve ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:144: in solver return firedrake.LinearSolver(self.A, solver_parameters=self.solver_parameters) ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:139: in A form_compiler_parameters=self.form_compiler_parameters) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________________ test_3d_near_to_far_parallel __________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________________ test_3d_up_to_down _______________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 35050) DG1 = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', tetrahedron, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 35050)) W = WithGeometry(FunctionSpace(, FiniteElement('Raviart-Thomas', tetrahedron, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 35050)) def test_3d_up_to_down(mesh, DG1, W): > run_up_to_down(mesh, DG1, W) tests/regression/test_steady_advection_3D.py:97: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_steady_advection_3D.py:70: in run_up_to_down u0 = project(velocity, W) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:158: in apply_massinv return self.solver.solve ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:144: in solver return firedrake.LinearSolver(self.A, solver_parameters=self.solver_parameters) ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:139: in A form_compiler_parameters=self.form_compiler_parameters) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_3d_up_to_down_parallel __________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________ test_stokes_hdiv_parallel[aij-RT3-DG2] _____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________ test_stokes_hdiv_parallel[aij-BDM2-DG1] ____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________ test_stokes_hdiv_parallel[nest-RT3-DG2] ____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________________ test_stokes_hdiv_parallel[nest-BDM2-DG1] ____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________ test_stokes_hdiv_parallel[matfree-RT3-DG2] ___________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________ test_stokes_hdiv_parallel[matfree-BDM2-DG1] __________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________________________ test_stokes_mini[aij] _____________________________________________________________ mat_type = 'aij' @pytest.mark.parametrize('mat_type', ["aij", "nest"]) def test_stokes_mini(mat_type): u_err = [] p_err = [] for n in range(3, 6): > errs = run_stokes_mini(mat_type, n) tests/regression/test_stokes_mini.py:71: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_stokes_mini.py:34: in run_stokes_mini bc1 = DirichletBC(W[0], inflow, 1) firedrake/bcs.py:282: in __init__ self.function_arg = g firedrake/bcs.py:348: in function_arg g = function.Function(self._function_space).interpolate(g) firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________________________ test_stokes_mini[nest] _____________________________________________________________ mat_type = 'nest' @pytest.mark.parametrize('mat_type', ["aij", "nest"]) def test_stokes_mini(mat_type): u_err = [] p_err = [] for n in range(3, 6): > errs = run_stokes_mini(mat_type, n) tests/regression/test_stokes_mini.py:71: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_stokes_mini.py:34: in run_stokes_mini bc1 = DirichletBC(W[0], inflow, 1) firedrake/bcs.py:282: in __init__ self.function_arg = g firedrake/bcs.py:348: in function_arg g = function.Function(self._function_space).interpolate(g) firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________________ test_box_1d_0form _______________________________________________________________ def test_box_1d_0form(): > run_box_1d_0form() tests/regression/test_subdomain.py:66: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_subdomain.py:11: in run_box_1d_0form f.interpolate(x[0]) firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_box_1d_0form_parallel ___________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________________ test_box_1d_1form _______________________________________________________________ def test_box_1d_1form(): > run_box_1d_1form() tests/regression/test_subdomain.py:75: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_subdomain.py:30: in run_box_1d_1form whole = assemble(v*dx).dat.data firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_box_1d_1form_parallel ___________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________________ test_box_1d_2form _______________________________________________________________ def test_box_1d_2form(): > run_box_1d_2form() tests/regression/test_subdomain.py:84: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_subdomain.py:48: in run_box_1d_2form whole = assemble(u*v*dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_box_1d_2form_parallel ___________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________________ test_overlap_subdomain_facets _________________________________________________________ def test_overlap_subdomain_facets(): m = UnitSquareMesh(10, 10) c = Constant(1, domain=m) > f = assemble(c*(ds(1) + ds)) tests/regression/test_subdomain_integrals.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_solve_cell_subdomains[v*u*dx + v*u*dx(2) - v*dx] _____________________________________________ form = Form([Integral(Product(Argument(WithGeometry(FunctionSpace(, Fin...0, None)), 'cell', Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35070), 'everywhere', {}, None)]) u = Coefficient(WithGeometry(FunctionSpace(, FiniteElement('Disconti...Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35070)), 53750) def test_solve_cell_subdomains(form, u): solve(form == 0, u) expect = Function(u.function_space()) mesh = u.ufl_domain() > expect.interpolate(Constant(1.0), subset=mesh.cell_subset(1)) tests/regression/test_subdomain_integrals.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _____________________________________ test_solve_cell_subdomains[v*u*dx(1) + v*u*dx(2) + v*u*dx(2) - v*dx] ______________________________________ form = Form([Integral(Product(Argument(WithGeometry(FunctionSpace(, Fin...0, None)), 'cell', Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35076), 'everywhere', {}, None)]) u = Coefficient(WithGeometry(FunctionSpace(, FiniteElement('Disconti...Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35076)), 53769) def test_solve_cell_subdomains(form, u): solve(form == 0, u) expect = Function(u.function_space()) mesh = u.ufl_domain() > expect.interpolate(Constant(1.0), subset=mesh.cell_subset(1)) tests/regression/test_subdomain_integrals.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ______________________________________ test_solve_cell_subdomains[v*u*dx + v*u*dx(2) - v*dx(1) - v*dx(2)] _______________________________________ form = Form([Integral(Product(IntValue(-1), Argument(WithGeometry(FunctionSpace(, FiniteElement('Disconti...Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35082)), 53790) def test_solve_cell_subdomains(form, u): solve(form == 0, u) expect = Function(u.function_space()) mesh = u.ufl_domain() > expect.interpolate(Constant(1.0), subset=mesh.cell_subset(1)) tests/regression/test_subdomain_integrals.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set _______________________________ test_solve_cell_subdomains[v*u*dx(1) + v*u*dx(2) + v*u*dx(2) -v*dx(1) - v*dx(2)] ________________________________ form = Form([Integral(Product(Argument(WithGeometry(FunctionSpace(, Fin..., 35088)), 0, None)), 'cell', Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35088), 2, {}, None)]) u = Coefficient(WithGeometry(FunctionSpace(, FiniteElement('Disconti...Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35088)), 53811) def test_solve_cell_subdomains(form, u): solve(form == 0, u) expect = Function(u.function_space()) mesh = u.ufl_domain() > expect.interpolate(Constant(1.0), subset=mesh.cell_subset(1)) tests/regression/test_subdomain_integrals.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ------------------------------------------------------------- Captured stderr call -------------------------------------------------------------- Traceback (most recent call last): File "PETSc/petscsnes.pxi", line 271, in petsc4py.PETSc.SNES_Function File "/home/simone/firedrake/src/firedrake/firedrake/solving_utils.py", line 259, in form_function ctx._assemble_residual() File "/home/simone/firedrake/src/firedrake/firedrake/assemble.py", line 162, in thunk kernel() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 1765, in zero loop.enqueue() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 102, in enqueue _trace.append(self) File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 125, in append self.evaluate_all() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 142, in evaluate_all comp._run() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3746, in _run return self.compute() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3789, in compute self.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 3824, in global_to_local_begin arg.global_to_local_begin() File "/home/simone/firedrake/src/PyOP2/pyop2/base.py", line 449, in global_to_local_begin "Halo exchange already in flight for Arg %s" % self AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Exception ignored in: 'petsc4py.PETSc.traceback' SystemError: returned a result with an error set ________________________________________________ test_cell_facet_subdomains[v*u*dx + v*u*ds(2)] _________________________________________________ square = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35094) forms = [Form([Integral(Product(Argument(WithGeometry(FunctionSpace(, Fi...1, None)), 'exterior_facet', Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35094), 2, {}, None)])] def test_cell_facet_subdomains(square, forms): from operator import add V = FunctionSpace(square, "CG", 1) v = TestFunction(V) # noqa u = TrialFunction(V) # noqa forms = list(map(eval, forms)) full = reduce(add, forms) > full_mat = assemble(full).M.values tests/regression/test_subdomain_integrals.py:76: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_cell_facet_subdomains[v*u*dx(1) + v*u*ds(2) + v*u*dx(1)] _________________________________________ square = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35096) forms = [Form([Integral(Product(Argument(WithGeometry(FunctionSpace(, Fi... 35096)), 1, None)), 'cell', Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35096), 1, {}, None)])] def test_cell_facet_subdomains(square, forms): from operator import add V = FunctionSpace(square, "CG", 1) v = TestFunction(V) # noqa u = TrialFunction(V) # noqa forms = list(map(eval, forms)) full = reduce(add, forms) > full_mat = assemble(full).M.values tests/regression/test_subdomain_integrals.py:76: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_cell_facet_subdomains[v*u*dx + v*u*ds(1)] _________________________________________________ square = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35098) forms = [Form([Integral(Product(Argument(WithGeometry(FunctionSpace(, Fi...1, None)), 'exterior_facet', Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35098), 1, {}, None)])] def test_cell_facet_subdomains(square, forms): from operator import add V = FunctionSpace(square, "CG", 1) v = TestFunction(V) # noqa u = TrialFunction(V) # noqa forms = list(map(eval, forms)) full = reduce(add, forms) > full_mat = assemble(full).M.values tests/regression/test_subdomain_integrals.py:76: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________________ test_Taylor __________________________________________________________________ def test_Taylor(): mesh = UnitIntervalMesh(10) VT = FunctionSpace(mesh, "TDG", 2) V1 = FunctionSpace(mesh, "DG", 2) V0 = FunctionSpace(mesh, "DG", 0) x = SpatialCoordinate(mesh) > v = Function(V1).interpolate(sin(2*pi*x[0])) tests/regression/test_taylor.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_tensor_algebra_simplification[mu_s*inner(outer(v, n), grad(u))*ds-RT1(triangle)] _____________________________ form_expect = (Form([Integral(Product(Constant(FiniteElement('Real', None, 0), 53852), Inner(Outer(Argument(WithGeometry(FunctionSpa...'exterior_facet', Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35103), 'everywhere', {}, None)])) def test_tensor_algebra_simplification(form_expect): form, expect = form_expect > expect = assemble(expect).M.values tests/regression/test_tensor_algebra.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________ test_tensor_algebra_simplification[mu_s*inner(outer(v, n), grad(u))*ds-RT1(tet)] ________________________________ form_expect = (Form([Integral(Product(Constant(FiniteElement('Real', None, 0), 53857), Inner(Outer(Argument(WithGeometry(FunctionSpa...terior_facet', Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 35105), 'everywhere', {}, None)])) def test_tensor_algebra_simplification(form_expect): form, expect = form_expect > expect = assemble(expect).M.values tests/regression/test_tensor_algebra.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________ test_tensor_algebra_simplification[mu_s*(-inner(outer(v, n), grad(u)) - inner(outer(u, n), grad(v)))*ds-RT1(tet)] _______________ form_expect = (Form([Integral(Product(Constant(FiniteElement('Real', None, 0), 53861), Sum(Product(IntValue(-1), Inner(Outer(Argumen...terior_facet', Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 35105), 'everywhere', {}, None)])) def test_tensor_algebra_simplification(form_expect): form, expect = form_expect > expect = assemble(expect).M.values tests/regression/test_tensor_algebra.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________ test_tensor_algebra_simplification[mu_s*(-inner(outer(v, n), grad(u)) - inner(outer(u, n), grad(v)))*ds-RT1(triangle)] _____________ form_expect = (Form([Integral(Product(Constant(FiniteElement('Real', None, 0), 53865), Sum(Product(IntValue(-1), Inner(Outer(Argumen...'exterior_facet', Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35107), 'everywhere', {}, None)])) def test_tensor_algebra_simplification(form_expect): form, expect = form_expect > expect = assemble(expect).M.values tests/regression/test_tensor_algebra.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________ test_tensor_algebra_simplification[mu_s*(-inner(outer(v, n), grad(u)) - inner(outer(u, n), grad(v)))*ds-RT1(quad)] _______________ form_expect = (Form([Integral(Product(Constant(FiniteElement('Real', None, 0), 53870), Sum(Product(IntValue(-1), Inner(Outer(Argumen..., 'exterior_facet', Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35109), 'everywhere', {}, None)])) def test_tensor_algebra_simplification(form_expect): form, expect = form_expect > expect = assemble(expect).M.values tests/regression/test_tensor_algebra.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________ test_tensor_algebra_simplification[mu_s*inner(outer(v, n), grad(u))*ds-RT1(quad)] _______________________________ form_expect = (Form([Integral(Product(Constant(FiniteElement('Real', None, 0), 53874), Inner(Outer(Argument(WithGeometry(FunctionSpa..., 'exterior_facet', Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35109), 'everywhere', {}, None)])) def test_tensor_algebra_simplification(form_expect): form, expect = form_expect > expect = assemble(expect).M.values tests/regression/test_tensor_algebra.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________ test_tensor_algebra_simplification[-mu_s*(inner(outer(v, n), grad(u)) + inner(outer(u, n), grad(v)))*ds-RT1(quad)] _______________ form_expect = (Form([Integral(Product(Sum(Inner(Outer(Argument(WithGeometry(FunctionSpace( expect = assemble(expect).M.values tests/regression/test_tensor_algebra.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________ test_tensor_algebra_simplification[-mu_s*(inner(outer(v, n), grad(u)) + inner(outer(u, n), grad(v)))*ds-RT1(tet)] _______________ form_expect = (Form([Integral(Product(Sum(Inner(Outer(Argument(WithGeometry(FunctionSpace( expect = assemble(expect).M.values tests/regression/test_tensor_algebra.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________ test_tensor_algebra_simplification[-mu_s*(inner(outer(v, n), grad(u)) + inner(outer(u, n), grad(v)))*ds-RT1(triangle)] _____________ form_expect = (Form([Integral(Product(Sum(Inner(Outer(Argument(WithGeometry(FunctionSpace( expect = assemble(expect).M.values tests/regression/test_tensor_algebra.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_tensor_algebra_simplification[inner(outer(v, n), dot(grad(u), mu))*ds-RT1(quad)] _____________________________ form_expect = (Form([Integral(Inner(Outer(Argument(WithGeometry(FunctionSpace(..., 'exterior_facet', Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35115), 'everywhere', {}, None)])) def test_tensor_algebra_simplification(form_expect): form, expect = form_expect > expect = assemble(expect).M.values tests/regression/test_tensor_algebra.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_tensor_algebra_simplification[inner(outer(v, n), dot(grad(u), mu))*ds-RT1(tet)] ______________________________ form_expect = (Form([Integral(Inner(Outer(Argument(WithGeometry(FunctionSpace(...terior_facet', Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 35117), 'everywhere', {}, None)])) def test_tensor_algebra_simplification(form_expect): form, expect = form_expect > expect = assemble(expect).M.values tests/regression/test_tensor_algebra.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________ test_tensor_algebra_simplification[inner(outer(v, n), dot(grad(u), mu))*ds-RT1(triangle)] ___________________________ form_expect = (Form([Integral(Inner(Outer(Argument(WithGeometry(FunctionSpace(...'exterior_facet', Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35119), 'everywhere', {}, None)])) def test_tensor_algebra_simplification(form_expect): form, expect = form_expect > expect = assemble(expect).M.values tests/regression/test_tensor_algebra.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________ test_tensor_algebra_simplification[(inner(outer(v, n), dot(grad(u), mu)) + inner(outer(u, n), dot(grad(v), mu)))*ds-RT1(quad)] _________ form_expect = (Form([Integral(Sum(Inner(Outer(Argument(WithGeometry(FunctionSpace( expect = assemble(expect).M.values tests/regression/test_tensor_algebra.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________ test_tensor_algebra_simplification[(inner(outer(v, n), dot(grad(u), mu)) + inner(outer(u, n), dot(grad(v), mu)))*ds-RT1(tet)] _________ form_expect = (Form([Integral(Sum(Inner(Outer(Argument(WithGeometry(FunctionSpace( expect = assemble(expect).M.values tests/regression/test_tensor_algebra.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______ test_tensor_algebra_simplification[(inner(outer(v, n), dot(grad(u), mu)) + inner(outer(u, n), dot(grad(v), mu)))*ds-RT1(triangle)] _______ form_expect = (Form([Integral(Sum(Inner(Outer(Argument(WithGeometry(FunctionSpace( expect = assemble(expect).M.values tests/regression/test_tensor_algebra.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________ test_tensor_algebra_simplification[-(inner(outer(v, n), dot(grad(u), mu)) + inner(outer(u, n), dot(grad(v), mu)))*ds-RT1(quad)] ________ form_expect = (Form([Integral(Product(IntValue(-1), Sum(Inner(Outer(Argument(WithGeometry(FunctionSpace( expect = assemble(expect).M.values tests/regression/test_tensor_algebra.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________ test_tensor_algebra_simplification[-(inner(outer(v, n), dot(grad(u), mu)) + inner(outer(u, n), dot(grad(v), mu)))*ds-RT1(tet)] _________ form_expect = (Form([Integral(Product(IntValue(-1), Sum(Inner(Outer(Argument(WithGeometry(FunctionSpace( expect = assemble(expect).M.values tests/regression/test_tensor_algebra.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______ test_tensor_algebra_simplification[-(inner(outer(v, n), dot(grad(u), mu)) + inner(outer(u, n), dot(grad(v), mu)))*ds-RT1(triangle)] ______ form_expect = (Form([Integral(Product(IntValue(-1), Sum(Inner(Outer(Argument(WithGeometry(FunctionSpace( expect = assemble(expect).M.values tests/regression/test_tensor_algebra.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________ test_tensor_algebra_simplification[(-inner(outer(v, n), dot(grad(u), mu)) - inner(outer(u, n), dot(grad(v), mu)))*ds-RT1(quad)] ________ form_expect = (Form([Integral(Sum(Product(IntValue(-1), Inner(Outer(Argument(WithGeometry(FunctionSpace( expect = assemble(expect).M.values tests/regression/test_tensor_algebra.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________ test_tensor_algebra_simplification[(-inner(outer(v, n), dot(grad(u), mu)) - inner(outer(u, n), dot(grad(v), mu)))*ds-RT1(tet)] _________ form_expect = (Form([Integral(Sum(Product(IntValue(-1), Inner(Outer(Argument(WithGeometry(FunctionSpace( expect = assemble(expect).M.values tests/regression/test_tensor_algebra.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______ test_tensor_algebra_simplification[(-inner(outer(v, n), dot(grad(u), mu)) - inner(outer(u, n), dot(grad(v), mu)))*ds-RT1(triangle)] ______ form_expect = (Form([Integral(Sum(Product(IntValue(-1), Inner(Outer(Argument(WithGeometry(FunctionSpace( expect = assemble(expect).M.values tests/regression/test_tensor_algebra.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________________ test_trace_galerkin_projection[False-1] ____________________________________________________ degree = 1, quad = False @pytest.mark.parametrize('degree', range(1, 4)) @pytest.mark.parametrize('quad', [False, True]) def test_trace_galerkin_projection(degree, quad): """Tests the accuracy of the trace solution for the Galerkin projection problem.""" tr_err = trace_galerkin_projection(degree=degree, quad=quad, > conv_test_flag=0) tests/regression/test_trace_galerkin_projection.py:78: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_trace_galerkin_projection.py:53: in trace_galerkin_projection f.interpolate(cos(x*pi*2)*cos(y*pi*2)) firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________________ test_trace_galerkin_projection[False-2] ____________________________________________________ degree = 2, quad = False @pytest.mark.parametrize('degree', range(1, 4)) @pytest.mark.parametrize('quad', [False, True]) def test_trace_galerkin_projection(degree, quad): """Tests the accuracy of the trace solution for the Galerkin projection problem.""" tr_err = trace_galerkin_projection(degree=degree, quad=quad, > conv_test_flag=0) tests/regression/test_trace_galerkin_projection.py:78: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_trace_galerkin_projection.py:53: in trace_galerkin_projection f.interpolate(cos(x*pi*2)*cos(y*pi*2)) firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________________ test_trace_galerkin_projection[False-3] ____________________________________________________ degree = 3, quad = False @pytest.mark.parametrize('degree', range(1, 4)) @pytest.mark.parametrize('quad', [False, True]) def test_trace_galerkin_projection(degree, quad): """Tests the accuracy of the trace solution for the Galerkin projection problem.""" tr_err = trace_galerkin_projection(degree=degree, quad=quad, > conv_test_flag=0) tests/regression/test_trace_galerkin_projection.py:78: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_trace_galerkin_projection.py:53: in trace_galerkin_projection f.interpolate(cos(x*pi*2)*cos(y*pi*2)) firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________________ test_trace_galerkin_projection[True-1] _____________________________________________________ degree = 1, quad = True @pytest.mark.parametrize('degree', range(1, 4)) @pytest.mark.parametrize('quad', [False, True]) def test_trace_galerkin_projection(degree, quad): """Tests the accuracy of the trace solution for the Galerkin projection problem.""" tr_err = trace_galerkin_projection(degree=degree, quad=quad, > conv_test_flag=0) tests/regression/test_trace_galerkin_projection.py:78: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_trace_galerkin_projection.py:53: in trace_galerkin_projection f.interpolate(cos(x*pi*2)*cos(y*pi*2)) firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________________ test_trace_galerkin_projection[True-2] _____________________________________________________ degree = 2, quad = True @pytest.mark.parametrize('degree', range(1, 4)) @pytest.mark.parametrize('quad', [False, True]) def test_trace_galerkin_projection(degree, quad): """Tests the accuracy of the trace solution for the Galerkin projection problem.""" tr_err = trace_galerkin_projection(degree=degree, quad=quad, > conv_test_flag=0) tests/regression/test_trace_galerkin_projection.py:78: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_trace_galerkin_projection.py:53: in trace_galerkin_projection f.interpolate(cos(x*pi*2)*cos(y*pi*2)) firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________________ test_trace_galerkin_projection[True-3] _____________________________________________________ degree = 3, quad = True @pytest.mark.parametrize('degree', range(1, 4)) @pytest.mark.parametrize('quad', [False, True]) def test_trace_galerkin_projection(degree, quad): """Tests the accuracy of the trace solution for the Galerkin projection problem.""" tr_err = trace_galerkin_projection(degree=degree, quad=quad, > conv_test_flag=0) tests/regression/test_trace_galerkin_projection.py:78: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_trace_galerkin_projection.py:53: in trace_galerkin_projection f.interpolate(cos(x*pi*2)*cos(y*pi*2)) firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_convergence_rates_trace_galerkin_projection[False-1-1.5] _________________________________________ testdegree = 1, convrate = 1.5, quad = False @pytest.mark.parametrize(('testdegree', 'convrate'), [(1, 1.5), (2, 2.5), (3, 3.5)]) @pytest.mark.parametrize('quad', [False, True]) def test_convergence_rates_trace_galerkin_projection(testdegree, convrate, quad): """Tests for degree + (1/2) order convergence of the trace problem.""" l2errors = np.array([trace_galerkin_projection(degree=testdegree, quad=quad, conv_test_flag=1, mesh_res=r) > for r in range(1, 5)]) tests/regression/test_trace_galerkin_projection.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_trace_galerkin_projection.py:92: in for r in range(1, 5)]) tests/regression/test_trace_galerkin_projection.py:53: in trace_galerkin_projection f.interpolate(cos(x*pi*2)*cos(y*pi*2)) firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_convergence_rates_trace_galerkin_projection[False-2-2.5] _________________________________________ testdegree = 2, convrate = 2.5, quad = False @pytest.mark.parametrize(('testdegree', 'convrate'), [(1, 1.5), (2, 2.5), (3, 3.5)]) @pytest.mark.parametrize('quad', [False, True]) def test_convergence_rates_trace_galerkin_projection(testdegree, convrate, quad): """Tests for degree + (1/2) order convergence of the trace problem.""" l2errors = np.array([trace_galerkin_projection(degree=testdegree, quad=quad, conv_test_flag=1, mesh_res=r) > for r in range(1, 5)]) tests/regression/test_trace_galerkin_projection.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_trace_galerkin_projection.py:92: in for r in range(1, 5)]) tests/regression/test_trace_galerkin_projection.py:53: in trace_galerkin_projection f.interpolate(cos(x*pi*2)*cos(y*pi*2)) firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_convergence_rates_trace_galerkin_projection[False-3-3.5] _________________________________________ testdegree = 3, convrate = 3.5, quad = False @pytest.mark.parametrize(('testdegree', 'convrate'), [(1, 1.5), (2, 2.5), (3, 3.5)]) @pytest.mark.parametrize('quad', [False, True]) def test_convergence_rates_trace_galerkin_projection(testdegree, convrate, quad): """Tests for degree + (1/2) order convergence of the trace problem.""" l2errors = np.array([trace_galerkin_projection(degree=testdegree, quad=quad, conv_test_flag=1, mesh_res=r) > for r in range(1, 5)]) tests/regression/test_trace_galerkin_projection.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_trace_galerkin_projection.py:92: in for r in range(1, 5)]) tests/regression/test_trace_galerkin_projection.py:53: in trace_galerkin_projection f.interpolate(cos(x*pi*2)*cos(y*pi*2)) firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_convergence_rates_trace_galerkin_projection[True-1-1.5] __________________________________________ testdegree = 1, convrate = 1.5, quad = True @pytest.mark.parametrize(('testdegree', 'convrate'), [(1, 1.5), (2, 2.5), (3, 3.5)]) @pytest.mark.parametrize('quad', [False, True]) def test_convergence_rates_trace_galerkin_projection(testdegree, convrate, quad): """Tests for degree + (1/2) order convergence of the trace problem.""" l2errors = np.array([trace_galerkin_projection(degree=testdegree, quad=quad, conv_test_flag=1, mesh_res=r) > for r in range(1, 5)]) tests/regression/test_trace_galerkin_projection.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_trace_galerkin_projection.py:92: in for r in range(1, 5)]) tests/regression/test_trace_galerkin_projection.py:53: in trace_galerkin_projection f.interpolate(cos(x*pi*2)*cos(y*pi*2)) firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_convergence_rates_trace_galerkin_projection[True-2-2.5] __________________________________________ testdegree = 2, convrate = 2.5, quad = True @pytest.mark.parametrize(('testdegree', 'convrate'), [(1, 1.5), (2, 2.5), (3, 3.5)]) @pytest.mark.parametrize('quad', [False, True]) def test_convergence_rates_trace_galerkin_projection(testdegree, convrate, quad): """Tests for degree + (1/2) order convergence of the trace problem.""" l2errors = np.array([trace_galerkin_projection(degree=testdegree, quad=quad, conv_test_flag=1, mesh_res=r) > for r in range(1, 5)]) tests/regression/test_trace_galerkin_projection.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_trace_galerkin_projection.py:92: in for r in range(1, 5)]) tests/regression/test_trace_galerkin_projection.py:53: in trace_galerkin_projection f.interpolate(cos(x*pi*2)*cos(y*pi*2)) firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_convergence_rates_trace_galerkin_projection[True-3-3.5] __________________________________________ testdegree = 3, convrate = 3.5, quad = True @pytest.mark.parametrize(('testdegree', 'convrate'), [(1, 1.5), (2, 2.5), (3, 3.5)]) @pytest.mark.parametrize('quad', [False, True]) def test_convergence_rates_trace_galerkin_projection(testdegree, convrate, quad): """Tests for degree + (1/2) order convergence of the trace problem.""" l2errors = np.array([trace_galerkin_projection(degree=testdegree, quad=quad, conv_test_flag=1, mesh_res=r) > for r in range(1, 5)]) tests/regression/test_trace_galerkin_projection.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_trace_galerkin_projection.py:92: in for r in range(1, 5)]) tests/regression/test_trace_galerkin_projection.py:53: in trace_galerkin_projection f.interpolate(cos(x*pi*2)*cos(y*pi*2)) firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________________________ test_cellsize_1d[1] ______________________________________________________________ n = 1 @pytest.mark.parametrize('n', [1, 3, 16]) def test_cellsize_1d(n): > assert abs(assemble(CellSize(UnitIntervalMesh(n))*dx) - 1.0/n) < 1e-14 tests/regression/test_ufl.py:8: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________________________ test_cellsize_1d[3] ______________________________________________________________ n = 3 @pytest.mark.parametrize('n', [1, 3, 16]) def test_cellsize_1d(n): > assert abs(assemble(CellSize(UnitIntervalMesh(n))*dx) - 1.0/n) < 1e-14 tests/regression/test_ufl.py:8: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________________ test_cellsize_1d[16] ______________________________________________________________ n = 16 @pytest.mark.parametrize('n', [1, 3, 16]) def test_cellsize_1d(n): > assert abs(assemble(CellSize(UnitIntervalMesh(n))*dx) - 1.0/n) < 1e-14 tests/regression/test_ufl.py:8: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________________________ test_cellsize_2d[1] ______________________________________________________________ n = 1 @pytest.mark.parametrize('n', [1, 3, 16]) def test_cellsize_2d(n): > assert abs(assemble(CellSize(UnitSquareMesh(n, n))*dx) - sqrt(2)/n) < 1e-14 tests/regression/test_ufl.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________________________ test_cellsize_2d[3] ______________________________________________________________ n = 3 @pytest.mark.parametrize('n', [1, 3, 16]) def test_cellsize_2d(n): > assert abs(assemble(CellSize(UnitSquareMesh(n, n))*dx) - sqrt(2)/n) < 1e-14 tests/regression/test_ufl.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________________ test_cellsize_2d[16] ______________________________________________________________ n = 16 @pytest.mark.parametrize('n', [1, 3, 16]) def test_cellsize_2d(n): > assert abs(assemble(CellSize(UnitSquareMesh(n, n))*dx) - sqrt(2)/n) < 1e-14 tests/regression/test_ufl.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________________________ test_cellsize_3d[1] ______________________________________________________________ n = 1 @pytest.mark.parametrize('n', [1, 3, 16]) def test_cellsize_3d(n): > assert abs(assemble(CellSize(UnitCubeMesh(n, n, n))*dx) - sqrt(3)/n) < 5e-12 tests/regression/test_ufl.py:18: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________________________ test_cellsize_3d[3] ______________________________________________________________ n = 3 @pytest.mark.parametrize('n', [1, 3, 16]) def test_cellsize_3d(n): > assert abs(assemble(CellSize(UnitCubeMesh(n, n, n))*dx) - sqrt(3)/n) < 5e-12 tests/regression/test_ufl.py:18: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________________ test_cellsize_3d[16] ______________________________________________________________ n = 16 @pytest.mark.parametrize('n', [1, 3, 16]) def test_cellsize_3d(n): > assert abs(assemble(CellSize(UnitCubeMesh(n, n, n))*dx) - sqrt(3)/n) < 5e-12 tests/regression/test_ufl.py:18: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________________ test_upwind_flux_icosahedral_sphere ______________________________________________________ def test_upwind_flux_icosahedral_sphere(): > run_test(quadrilateral=False) tests/regression/test_upwind_flux.py:100: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_upwind_flux.py:42: in run_test mesh.init_cell_orientations(global_normal) firedrake/mesh.py:1203: in init_cell_orientations f.interpolate(ufl.dot(expr, ufl.cross(ReferenceGrad(x)[:, 0], ReferenceGrad(x)[:, 1]))) firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_upwind_flux_icosahedral_sphere_parallel __________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________________ test_upwind_flux_cubed_sphere _________________________________________________________ def test_upwind_flux_cubed_sphere(): > run_test(quadrilateral=True) tests/regression/test_upwind_flux.py:109: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_upwind_flux.py:42: in run_test mesh.init_cell_orientations(global_normal) firedrake/mesh.py:1203: in init_cell_orientations f.interpolate(ufl.dot(expr, ufl.cross(ReferenceGrad(x)[:, 0], ReferenceGrad(x)[:, 1]))) firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________________ test_upwind_flux_cubed_sphere_parallel _____________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ____________________________________________________________ test_mixed_vector_copy _____________________________________________________________ def test_mixed_vector_copy(): mesh = UnitIntervalMesh(2) V = FunctionSpace(mesh, "CG", 1) W = V*V f = Function(W) > f.assign(1) tests/regression/test_vector.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________________ test_parallel_gather ______________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________________ test_hcurl_convergence[testcase0-0.9] _____________________________________________________ testcase = (1, (2, 4)), convrate = 0.9 @pytest.mark.parametrize(('testcase', 'convrate'), [((1, (2, 4)), 0.9), ((2, (2, 4)), 1.9), ((3, (2, 4)), 2.9), ((4, (2, 4)), 3.9)]) def test_hcurl_convergence(testcase, convrate): degree, (start, end) = testcase l2err = np.zeros((end - start, 2)) for ii in [i + start for i in range(len(l2err))]: > l2err[ii - start, :] = vector_laplace(2 ** ii, degree) tests/regression/test_vector_laplace_on_quadrilaterals.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_vector_laplace_on_quadrilaterals.py:28: in vector_laplace f = Function(W1).interpolate(f_expr) firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________ test_hcurl_convergence[testcase1-1.9] _____________________________________________________ testcase = (2, (2, 4)), convrate = 1.9 @pytest.mark.parametrize(('testcase', 'convrate'), [((1, (2, 4)), 0.9), ((2, (2, 4)), 1.9), ((3, (2, 4)), 2.9), ((4, (2, 4)), 3.9)]) def test_hcurl_convergence(testcase, convrate): degree, (start, end) = testcase l2err = np.zeros((end - start, 2)) for ii in [i + start for i in range(len(l2err))]: > l2err[ii - start, :] = vector_laplace(2 ** ii, degree) tests/regression/test_vector_laplace_on_quadrilaterals.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_vector_laplace_on_quadrilaterals.py:28: in vector_laplace f = Function(W1).interpolate(f_expr) firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________ test_hcurl_convergence[testcase2-2.9] _____________________________________________________ testcase = (3, (2, 4)), convrate = 2.9 @pytest.mark.parametrize(('testcase', 'convrate'), [((1, (2, 4)), 0.9), ((2, (2, 4)), 1.9), ((3, (2, 4)), 2.9), ((4, (2, 4)), 3.9)]) def test_hcurl_convergence(testcase, convrate): degree, (start, end) = testcase l2err = np.zeros((end - start, 2)) for ii in [i + start for i in range(len(l2err))]: > l2err[ii - start, :] = vector_laplace(2 ** ii, degree) tests/regression/test_vector_laplace_on_quadrilaterals.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_vector_laplace_on_quadrilaterals.py:28: in vector_laplace f = Function(W1).interpolate(f_expr) firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________ test_hcurl_convergence[testcase3-3.9] _____________________________________________________ testcase = (4, (2, 4)), convrate = 3.9 @pytest.mark.parametrize(('testcase', 'convrate'), [((1, (2, 4)), 0.9), ((2, (2, 4)), 1.9), ((3, (2, 4)), 2.9), ((4, (2, 4)), 3.9)]) def test_hcurl_convergence(testcase, convrate): degree, (start, end) = testcase l2err = np.zeros((end - start, 2)) for ii in [i + start for i in range(len(l2err))]: > l2err[ii - start, :] = vector_laplace(2 ** ii, degree) tests/regression/test_vector_laplace_on_quadrilaterals.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/regression/test_vector_laplace_on_quadrilaterals.py:28: in vector_laplace f = Function(W1).interpolate(f_expr) firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________________________ test_parallel_limiting _____________________________________________________________ tmpdir = local('/tmp/pytest-of-simone/pytest-1/test_parallel_limiting0') def test_parallel_limiting(tmpdir): import pickle mesh = RectangleMesh(10, 4, 5000., 1000.) V = FunctionSpace(mesh, 'DG', 1) f = Function(V) x, *_ = SpatialCoordinate(mesh) > f.project(sin(2*pi*x/3000.)) tests/regression/test_vertex_based_limiter.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:189: in rhs self.assembler() firedrake/assemble.py:162: in thunk kernel() ../PyOP2/pyop2/base.py:1765: in zero loop.enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________________ test_assign_component[1] ____________________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35285)) def test_assign_component(V): f = Function(V) > f.assign(Constant((1, 2))) tests/regression/test_vfs_component_bcs.py:24: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________________ test_assign_component[2] ____________________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 2), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35289)) def test_assign_component(V): f = Function(V) > f.assign(Constant((1, 2))) tests/regression/test_vfs_component_bcs.py:24: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________________ test_apply_bc_component[1-0] __________________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35293)) idx = 0 def test_apply_bc_component(V, idx): f = Function(V) bc = DirichletBC(V.sub(idx), Constant(10), (1, 3)) > bc.apply(f) tests/regression/test_vfs_component_bcs.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in apply ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/bcs.py:432: in apply r.assign(self.function_arg, subset=self.node_set) :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________________ test_apply_bc_component[1-1] __________________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35299)) idx = 1 def test_apply_bc_component(V, idx): f = Function(V) bc = DirichletBC(V.sub(idx), Constant(10), (1, 3)) > bc.apply(f) tests/regression/test_vfs_component_bcs.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in apply ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/bcs.py:432: in apply r.assign(self.function_arg, subset=self.node_set) :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________________ test_apply_bc_component[2-0] __________________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 2), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35305)) idx = 0 def test_apply_bc_component(V, idx): f = Function(V) bc = DirichletBC(V.sub(idx), Constant(10), (1, 3)) > bc.apply(f) tests/regression/test_vfs_component_bcs.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in apply ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/bcs.py:432: in apply r.assign(self.function_arg, subset=self.node_set) :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________________ test_apply_bc_component[2-1] __________________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 2), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35311)) idx = 1 def test_apply_bc_component(V, idx): f = Function(V) bc = DirichletBC(V.sub(idx), Constant(10), (1, 3)) > bc.apply(f) tests/regression/test_vfs_component_bcs.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in apply ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/bcs.py:432: in apply r.assign(self.function_arg, subset=self.node_set) :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________________ test_poisson_in_components[1] _________________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35317)) def test_poisson_in_components(V): # Solve vector laplacian with different boundary conditions on the # x and y components, giving effectively two decoupled Poisson # problems in the two components g = Function(V) f = Constant((0, 0)) bcs = [DirichletBC(V.sub(0), 0, 1), DirichletBC(V.sub(0), 42, 2), DirichletBC(V.sub(1), 10, 3), DirichletBC(V.sub(1), 15, 4)] u = TrialFunction(V) v = TestFunction(V) a = inner(grad(u), grad(v))*dx L = dot(f, v)*dx > solve(a == L, g, bcs=bcs) tests/regression/test_vfs_component_bcs.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:249: in solve dbc.apply(self._problem.u) :2: in apply ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/bcs.py:432: in apply r.assign(self.function_arg, subset=self.node_set) :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________________ test_poisson_in_components[2] _________________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 2), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35325)) def test_poisson_in_components(V): # Solve vector laplacian with different boundary conditions on the # x and y components, giving effectively two decoupled Poisson # problems in the two components g = Function(V) f = Constant((0, 0)) bcs = [DirichletBC(V.sub(0), 0, 1), DirichletBC(V.sub(0), 42, 2), DirichletBC(V.sub(1), 10, 3), DirichletBC(V.sub(1), 15, 4)] u = TrialFunction(V) v = TestFunction(V) a = inner(grad(u), grad(v))*dx L = dot(f, v)*dx > solve(a == L, g, bcs=bcs) tests/regression/test_vfs_component_bcs.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:249: in solve dbc.apply(self._problem.u) :2: in apply ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/bcs.py:432: in apply r.assign(self.function_arg, subset=self.node_set) :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_poisson_in_mixed_plus_vfs_components[1-UFL value0-aij] __________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35333)) mat_type = 'aij', make_val = at 0x7f3e727fd268> @pytest.mark.parametrize("mat_type", ["aij", "nest"]) @pytest.mark.parametrize("make_val", [lambda x: x, lambda x: x], ids=["UFL value", "UFL value"]) def test_poisson_in_mixed_plus_vfs_components(V, mat_type, make_val): # Solve five decoupled poisson problems with different boundary # conditions in a mixed space composed of two VectorFunctionSpaces # and one scalar FunctionSpace. # Tests application of boundary conditions to components in mixed # spaces. Q = FunctionSpace(V.mesh(), "CG", 2) W = V*Q*V g = Function(W) bcs = [DirichletBC(W.sub(0).sub(0), make_val(0), 1), DirichletBC(W.sub(0).sub(0), make_val(42), 2), DirichletBC(W.sub(0).sub(1), make_val(10), 3), DirichletBC(W.sub(0).sub(1), make_val(15), 4), DirichletBC(W.sub(1), make_val(4), 1), DirichletBC(W.sub(1), make_val(10), 2), DirichletBC(W.sub(2).sub(0), make_val(-10), 1), DirichletBC(W.sub(2).sub(0), make_val(10), 2), DirichletBC(W.sub(2).sub(1), make_val(15), 3), DirichletBC(W.sub(2).sub(1), make_val(5), 4)] u, p, r = TrialFunctions(W) v, q, s = TestFunctions(W) a = inner(grad(u), grad(v))*dx + \ inner(grad(r), grad(s))*dx + \ dot(grad(p), grad(q))*dx L = dot(Constant((0, 0)), v)*dx + \ Constant(0)*q*dx + \ dot(Constant((0, 0)), s)*dx > solve(a == L, g, bcs=bcs, solver_parameters={'mat_type': mat_type}) tests/regression/test_vfs_component_bcs.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:249: in solve dbc.apply(self._problem.u) :2: in apply ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/bcs.py:432: in apply r.assign(self.function_arg, subset=self.node_set) :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_poisson_in_mixed_plus_vfs_components[1-UFL value0-nest] __________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35349)) mat_type = 'nest', make_val = at 0x7f3e727fd268> @pytest.mark.parametrize("mat_type", ["aij", "nest"]) @pytest.mark.parametrize("make_val", [lambda x: x, lambda x: x], ids=["UFL value", "UFL value"]) def test_poisson_in_mixed_plus_vfs_components(V, mat_type, make_val): # Solve five decoupled poisson problems with different boundary # conditions in a mixed space composed of two VectorFunctionSpaces # and one scalar FunctionSpace. # Tests application of boundary conditions to components in mixed # spaces. Q = FunctionSpace(V.mesh(), "CG", 2) W = V*Q*V g = Function(W) bcs = [DirichletBC(W.sub(0).sub(0), make_val(0), 1), DirichletBC(W.sub(0).sub(0), make_val(42), 2), DirichletBC(W.sub(0).sub(1), make_val(10), 3), DirichletBC(W.sub(0).sub(1), make_val(15), 4), DirichletBC(W.sub(1), make_val(4), 1), DirichletBC(W.sub(1), make_val(10), 2), DirichletBC(W.sub(2).sub(0), make_val(-10), 1), DirichletBC(W.sub(2).sub(0), make_val(10), 2), DirichletBC(W.sub(2).sub(1), make_val(15), 3), DirichletBC(W.sub(2).sub(1), make_val(5), 4)] u, p, r = TrialFunctions(W) v, q, s = TestFunctions(W) a = inner(grad(u), grad(v))*dx + \ inner(grad(r), grad(s))*dx + \ dot(grad(p), grad(q))*dx L = dot(Constant((0, 0)), v)*dx + \ Constant(0)*q*dx + \ dot(Constant((0, 0)), s)*dx > solve(a == L, g, bcs=bcs, solver_parameters={'mat_type': mat_type}) tests/regression/test_vfs_component_bcs.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:249: in solve dbc.apply(self._problem.u) :2: in apply ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/bcs.py:432: in apply r.assign(self.function_arg, subset=self.node_set) :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_poisson_in_mixed_plus_vfs_components[1-UFL value1-aij] __________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35365)) mat_type = 'aij', make_val = at 0x7f3e727fd2f0> @pytest.mark.parametrize("mat_type", ["aij", "nest"]) @pytest.mark.parametrize("make_val", [lambda x: x, lambda x: x], ids=["UFL value", "UFL value"]) def test_poisson_in_mixed_plus_vfs_components(V, mat_type, make_val): # Solve five decoupled poisson problems with different boundary # conditions in a mixed space composed of two VectorFunctionSpaces # and one scalar FunctionSpace. # Tests application of boundary conditions to components in mixed # spaces. Q = FunctionSpace(V.mesh(), "CG", 2) W = V*Q*V g = Function(W) bcs = [DirichletBC(W.sub(0).sub(0), make_val(0), 1), DirichletBC(W.sub(0).sub(0), make_val(42), 2), DirichletBC(W.sub(0).sub(1), make_val(10), 3), DirichletBC(W.sub(0).sub(1), make_val(15), 4), DirichletBC(W.sub(1), make_val(4), 1), DirichletBC(W.sub(1), make_val(10), 2), DirichletBC(W.sub(2).sub(0), make_val(-10), 1), DirichletBC(W.sub(2).sub(0), make_val(10), 2), DirichletBC(W.sub(2).sub(1), make_val(15), 3), DirichletBC(W.sub(2).sub(1), make_val(5), 4)] u, p, r = TrialFunctions(W) v, q, s = TestFunctions(W) a = inner(grad(u), grad(v))*dx + \ inner(grad(r), grad(s))*dx + \ dot(grad(p), grad(q))*dx L = dot(Constant((0, 0)), v)*dx + \ Constant(0)*q*dx + \ dot(Constant((0, 0)), s)*dx > solve(a == L, g, bcs=bcs, solver_parameters={'mat_type': mat_type}) tests/regression/test_vfs_component_bcs.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:249: in solve dbc.apply(self._problem.u) :2: in apply ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/bcs.py:432: in apply r.assign(self.function_arg, subset=self.node_set) :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_poisson_in_mixed_plus_vfs_components[1-UFL value1-nest] __________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35381)) mat_type = 'nest', make_val = at 0x7f3e727fd2f0> @pytest.mark.parametrize("mat_type", ["aij", "nest"]) @pytest.mark.parametrize("make_val", [lambda x: x, lambda x: x], ids=["UFL value", "UFL value"]) def test_poisson_in_mixed_plus_vfs_components(V, mat_type, make_val): # Solve five decoupled poisson problems with different boundary # conditions in a mixed space composed of two VectorFunctionSpaces # and one scalar FunctionSpace. # Tests application of boundary conditions to components in mixed # spaces. Q = FunctionSpace(V.mesh(), "CG", 2) W = V*Q*V g = Function(W) bcs = [DirichletBC(W.sub(0).sub(0), make_val(0), 1), DirichletBC(W.sub(0).sub(0), make_val(42), 2), DirichletBC(W.sub(0).sub(1), make_val(10), 3), DirichletBC(W.sub(0).sub(1), make_val(15), 4), DirichletBC(W.sub(1), make_val(4), 1), DirichletBC(W.sub(1), make_val(10), 2), DirichletBC(W.sub(2).sub(0), make_val(-10), 1), DirichletBC(W.sub(2).sub(0), make_val(10), 2), DirichletBC(W.sub(2).sub(1), make_val(15), 3), DirichletBC(W.sub(2).sub(1), make_val(5), 4)] u, p, r = TrialFunctions(W) v, q, s = TestFunctions(W) a = inner(grad(u), grad(v))*dx + \ inner(grad(r), grad(s))*dx + \ dot(grad(p), grad(q))*dx L = dot(Constant((0, 0)), v)*dx + \ Constant(0)*q*dx + \ dot(Constant((0, 0)), s)*dx > solve(a == L, g, bcs=bcs, solver_parameters={'mat_type': mat_type}) tests/regression/test_vfs_component_bcs.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:249: in solve dbc.apply(self._problem.u) :2: in apply ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/bcs.py:432: in apply r.assign(self.function_arg, subset=self.node_set) :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_poisson_in_mixed_plus_vfs_components[2-UFL value0-aij] __________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 2), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35397)) mat_type = 'aij', make_val = at 0x7f3e727fd268> @pytest.mark.parametrize("mat_type", ["aij", "nest"]) @pytest.mark.parametrize("make_val", [lambda x: x, lambda x: x], ids=["UFL value", "UFL value"]) def test_poisson_in_mixed_plus_vfs_components(V, mat_type, make_val): # Solve five decoupled poisson problems with different boundary # conditions in a mixed space composed of two VectorFunctionSpaces # and one scalar FunctionSpace. # Tests application of boundary conditions to components in mixed # spaces. Q = FunctionSpace(V.mesh(), "CG", 2) W = V*Q*V g = Function(W) bcs = [DirichletBC(W.sub(0).sub(0), make_val(0), 1), DirichletBC(W.sub(0).sub(0), make_val(42), 2), DirichletBC(W.sub(0).sub(1), make_val(10), 3), DirichletBC(W.sub(0).sub(1), make_val(15), 4), DirichletBC(W.sub(1), make_val(4), 1), DirichletBC(W.sub(1), make_val(10), 2), DirichletBC(W.sub(2).sub(0), make_val(-10), 1), DirichletBC(W.sub(2).sub(0), make_val(10), 2), DirichletBC(W.sub(2).sub(1), make_val(15), 3), DirichletBC(W.sub(2).sub(1), make_val(5), 4)] u, p, r = TrialFunctions(W) v, q, s = TestFunctions(W) a = inner(grad(u), grad(v))*dx + \ inner(grad(r), grad(s))*dx + \ dot(grad(p), grad(q))*dx L = dot(Constant((0, 0)), v)*dx + \ Constant(0)*q*dx + \ dot(Constant((0, 0)), s)*dx > solve(a == L, g, bcs=bcs, solver_parameters={'mat_type': mat_type}) tests/regression/test_vfs_component_bcs.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:249: in solve dbc.apply(self._problem.u) :2: in apply ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/bcs.py:432: in apply r.assign(self.function_arg, subset=self.node_set) :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_poisson_in_mixed_plus_vfs_components[2-UFL value0-nest] __________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 2), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35413)) mat_type = 'nest', make_val = at 0x7f3e727fd268> @pytest.mark.parametrize("mat_type", ["aij", "nest"]) @pytest.mark.parametrize("make_val", [lambda x: x, lambda x: x], ids=["UFL value", "UFL value"]) def test_poisson_in_mixed_plus_vfs_components(V, mat_type, make_val): # Solve five decoupled poisson problems with different boundary # conditions in a mixed space composed of two VectorFunctionSpaces # and one scalar FunctionSpace. # Tests application of boundary conditions to components in mixed # spaces. Q = FunctionSpace(V.mesh(), "CG", 2) W = V*Q*V g = Function(W) bcs = [DirichletBC(W.sub(0).sub(0), make_val(0), 1), DirichletBC(W.sub(0).sub(0), make_val(42), 2), DirichletBC(W.sub(0).sub(1), make_val(10), 3), DirichletBC(W.sub(0).sub(1), make_val(15), 4), DirichletBC(W.sub(1), make_val(4), 1), DirichletBC(W.sub(1), make_val(10), 2), DirichletBC(W.sub(2).sub(0), make_val(-10), 1), DirichletBC(W.sub(2).sub(0), make_val(10), 2), DirichletBC(W.sub(2).sub(1), make_val(15), 3), DirichletBC(W.sub(2).sub(1), make_val(5), 4)] u, p, r = TrialFunctions(W) v, q, s = TestFunctions(W) a = inner(grad(u), grad(v))*dx + \ inner(grad(r), grad(s))*dx + \ dot(grad(p), grad(q))*dx L = dot(Constant((0, 0)), v)*dx + \ Constant(0)*q*dx + \ dot(Constant((0, 0)), s)*dx > solve(a == L, g, bcs=bcs, solver_parameters={'mat_type': mat_type}) tests/regression/test_vfs_component_bcs.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:249: in solve dbc.apply(self._problem.u) :2: in apply ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/bcs.py:432: in apply r.assign(self.function_arg, subset=self.node_set) :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_poisson_in_mixed_plus_vfs_components[2-UFL value1-aij] __________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 2), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35429)) mat_type = 'aij', make_val = at 0x7f3e727fd2f0> @pytest.mark.parametrize("mat_type", ["aij", "nest"]) @pytest.mark.parametrize("make_val", [lambda x: x, lambda x: x], ids=["UFL value", "UFL value"]) def test_poisson_in_mixed_plus_vfs_components(V, mat_type, make_val): # Solve five decoupled poisson problems with different boundary # conditions in a mixed space composed of two VectorFunctionSpaces # and one scalar FunctionSpace. # Tests application of boundary conditions to components in mixed # spaces. Q = FunctionSpace(V.mesh(), "CG", 2) W = V*Q*V g = Function(W) bcs = [DirichletBC(W.sub(0).sub(0), make_val(0), 1), DirichletBC(W.sub(0).sub(0), make_val(42), 2), DirichletBC(W.sub(0).sub(1), make_val(10), 3), DirichletBC(W.sub(0).sub(1), make_val(15), 4), DirichletBC(W.sub(1), make_val(4), 1), DirichletBC(W.sub(1), make_val(10), 2), DirichletBC(W.sub(2).sub(0), make_val(-10), 1), DirichletBC(W.sub(2).sub(0), make_val(10), 2), DirichletBC(W.sub(2).sub(1), make_val(15), 3), DirichletBC(W.sub(2).sub(1), make_val(5), 4)] u, p, r = TrialFunctions(W) v, q, s = TestFunctions(W) a = inner(grad(u), grad(v))*dx + \ inner(grad(r), grad(s))*dx + \ dot(grad(p), grad(q))*dx L = dot(Constant((0, 0)), v)*dx + \ Constant(0)*q*dx + \ dot(Constant((0, 0)), s)*dx > solve(a == L, g, bcs=bcs, solver_parameters={'mat_type': mat_type}) tests/regression/test_vfs_component_bcs.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:249: in solve dbc.apply(self._problem.u) :2: in apply ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/bcs.py:432: in apply r.assign(self.function_arg, subset=self.node_set) :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_poisson_in_mixed_plus_vfs_components[2-UFL value1-nest] __________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 2), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35445)) mat_type = 'nest', make_val = at 0x7f3e727fd2f0> @pytest.mark.parametrize("mat_type", ["aij", "nest"]) @pytest.mark.parametrize("make_val", [lambda x: x, lambda x: x], ids=["UFL value", "UFL value"]) def test_poisson_in_mixed_plus_vfs_components(V, mat_type, make_val): # Solve five decoupled poisson problems with different boundary # conditions in a mixed space composed of two VectorFunctionSpaces # and one scalar FunctionSpace. # Tests application of boundary conditions to components in mixed # spaces. Q = FunctionSpace(V.mesh(), "CG", 2) W = V*Q*V g = Function(W) bcs = [DirichletBC(W.sub(0).sub(0), make_val(0), 1), DirichletBC(W.sub(0).sub(0), make_val(42), 2), DirichletBC(W.sub(0).sub(1), make_val(10), 3), DirichletBC(W.sub(0).sub(1), make_val(15), 4), DirichletBC(W.sub(1), make_val(4), 1), DirichletBC(W.sub(1), make_val(10), 2), DirichletBC(W.sub(2).sub(0), make_val(-10), 1), DirichletBC(W.sub(2).sub(0), make_val(10), 2), DirichletBC(W.sub(2).sub(1), make_val(15), 3), DirichletBC(W.sub(2).sub(1), make_val(5), 4)] u, p, r = TrialFunctions(W) v, q, s = TestFunctions(W) a = inner(grad(u), grad(v))*dx + \ inner(grad(r), grad(s))*dx + \ dot(grad(p), grad(q))*dx L = dot(Constant((0, 0)), v)*dx + \ Constant(0)*q*dx + \ dot(Constant((0, 0)), s)*dx > solve(a == L, g, bcs=bcs, solver_parameters={'mat_type': mat_type}) tests/regression/test_vfs_component_bcs.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:249: in solve dbc.apply(self._problem.u) :2: in apply ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/bcs.py:432: in apply r.assign(self.function_arg, subset=self.node_set) :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________________ test_stokes_component_all ___________________________________________________________ def test_stokes_component_all(): mesh = UnitSquareMesh(10, 10) # Define function spaces V = VectorFunctionSpace(mesh, "CG", 2) Q = FunctionSpace(mesh, "CG", 1) W = V * Q # applyBcsComponentWise = True bc0 = DirichletBC(W.sub(0).sub(0), 0, [3, 4]) bc1 = DirichletBC(W.sub(0).sub(1), 0, [3, 4]) bc2 = DirichletBC(W.sub(0).sub(0), 1, 1) bc3 = DirichletBC(W.sub(0).sub(1), 0, 1) bcs_cmp = [bc0, bc1, bc2, bc3] bc0 = DirichletBC(W.sub(0), Constant((0.0, 0.0)), [3, 4]) bc1 = DirichletBC(W.sub(0), Constant((1.0, 0.0)), 1) bcs_all = [bc0, bc1] # Define variational problem (u, p) = TrialFunctions(W) (v, q) = TestFunctions(W) f = Constant((0.0, 0.0)) a = inner(grad(u), grad(v))*dx + div(v)*p*dx + q*div(u)*dx L = inner(f, v)*dx Uall = Function(W) solve(a == L, Uall, bcs=bcs_all, solver_parameters={"mat_type": "aij", "pc_type": "lu", > "pc_factor_shift_type": "nonzero"}) tests/regression/test_vfs_component_bcs.py:184: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/solving.py:125: in solve _solve_varproblem(*args, **kwargs) firedrake/solving.py:153: in _solve_varproblem solver.solve() firedrake/variational_solver.py:249: in solve dbc.apply(self._problem.u) :2: in apply ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/bcs.py:432: in apply r.assign(self.function_arg, subset=self.node_set) :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_component_full_bcs[1] ___________________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35490)) def test_component_full_bcs(V): bc0 = DirichletBC(V, Constant((0, 0)), [3, 4]) bc1 = DirichletBC(V, Constant((1, 0)), 1) bcs_full = [bc0, bc1] bc0 = DirichletBC(V.sub(0), 0, [3, 4]) bc1 = DirichletBC(V.sub(1), 0, [3, 4]) bc2 = DirichletBC(V.sub(0), 1, 1) bc3 = DirichletBC(V.sub(1), 0, 1) bcs_cmp = [bc0, bc1, bc2, bc3] bc0 = DirichletBC(V, Constant((0, 0)), [3, 4]) bc1 = DirichletBC(V.sub(0), 1, 1) bc2 = DirichletBC(V.sub(1), 0, 1) bcs_mixed = [bc0, bc1, bc2] u = TrialFunction(V) v = TestFunction(V) a = inner(grad(u), grad(v))*dx def asarray(A): return A.M.handle[:, :] > A_full = asarray(assemble(a, bcs=bcs_full, mat_type="aij")) tests/regression/test_vfs_component_bcs.py:217: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_component_full_bcs[2] ___________________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 2), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35492)) def test_component_full_bcs(V): bc0 = DirichletBC(V, Constant((0, 0)), [3, 4]) bc1 = DirichletBC(V, Constant((1, 0)), 1) bcs_full = [bc0, bc1] bc0 = DirichletBC(V.sub(0), 0, [3, 4]) bc1 = DirichletBC(V.sub(1), 0, [3, 4]) bc2 = DirichletBC(V.sub(0), 1, 1) bc3 = DirichletBC(V.sub(1), 0, 1) bcs_cmp = [bc0, bc1, bc2, bc3] bc0 = DirichletBC(V, Constant((0, 0)), [3, 4]) bc1 = DirichletBC(V.sub(0), 1, 1) bc2 = DirichletBC(V.sub(1), 0, 1) bcs_mixed = [bc0, bc1, bc2] u = TrialFunction(V) v = TestFunction(V) a = inner(grad(u), grad(v))*dx def asarray(A): return A.M.handle[:, :] > A_full = asarray(assemble(a, bcs=bcs_full, mat_type="aij")) tests/regression/test_vfs_component_bcs.py:217: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________________ test_component_full_bcs_overlap[1] _______________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35494)) def test_component_full_bcs_overlap(V): u = TrialFunction(V) v = TestFunction(V) bcs_1 = [DirichletBC(V.sub(1), 0, 3), DirichletBC(V, Constant((0, 0)), 4), DirichletBC(V.sub(0), 1, 1), DirichletBC(V.sub(1), 0, 1)] bcs_2 = [DirichletBC(V.sub(1), 0, 3), DirichletBC(V, Constant((0, 0)), 4), DirichletBC(V, Constant((1, 0)), 1)] a = inner(grad(u), grad(v)) * dx def asarray(A): return A.M.handle[:, :] > A_1 = asarray(assemble(a, bcs=bcs_1, mat_type="aij")) tests/regression/test_vfs_component_bcs.py:243: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________________ test_component_full_bcs_overlap[2] _______________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 2), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35496)) def test_component_full_bcs_overlap(V): u = TrialFunction(V) v = TestFunction(V) bcs_1 = [DirichletBC(V.sub(1), 0, 3), DirichletBC(V, Constant((0, 0)), 4), DirichletBC(V.sub(0), 1, 1), DirichletBC(V.sub(1), 0, 1)] bcs_2 = [DirichletBC(V.sub(1), 0, 3), DirichletBC(V, Constant((0, 0)), 4), DirichletBC(V, Constant((1, 0)), 1)] a = inner(grad(u), grad(v)) * dx def asarray(A): return A.M.handle[:, :] > A_1 = asarray(assemble(a, bcs=bcs_1, mat_type="aij")) tests/regression/test_vfs_component_bcs.py:243: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________________ test_get_restore_get ______________________________________________________________ V = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35517)) def test_get_restore_get(V): f = V.get_work_function() V.restore_work_function(f) > g = V.get_work_function() tests/regression/test_work_functions.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/functionspaceimpl.py:157: in get_work_function function.dat.zero() ../PyOP2/pyop2/base.py:1765: in zero loop.enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_max_work_functions_shared_across_instances ________________________________________________ V = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35528)) Q = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', triangle, 2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35528)) def test_max_work_functions_shared_across_instances(V, Q): V2 = FunctionSpace(V.mesh(), V.ufl_element()) assert V.max_work_functions == V2.max_work_functions V.max_work_functions = 1 assert V.max_work_functions == 1 assert V2.max_work_functions == 1 f = V.get_work_function() g = Q.get_work_function() assert f is not g Q.restore_work_function(g) with pytest.raises(ValueError): V2.get_work_function() with pytest.raises(ValueError): V.get_work_function() V.restore_work_function(f) > g = V2.get_work_function() tests/regression/test_work_functions.py:141: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/functionspaceimpl.py:157: in get_work_function function.dat.zero() ../PyOP2/pyop2/base.py:1765: in zero loop.enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________________ test_ds_dx[False] _______________________________________________________________ one = Constant(FiniteElement('Real', triangle, 0), 54621) def test_ds_dx(one): > assert np.allclose(assemble(one*dx + one*ds), 5.0) tests/regression/test_zero_forms.py:26: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________________ test_dsn[False-domains0] ____________________________________________________________ one = Constant(FiniteElement('Real', triangle, 0), 54621), domains = (1, 2) @pytest.mark.parametrize('domains', domains) def test_dsn(one, domains): > assert np.allclose(assemble(one*ds(domains)), len(domains)) tests/regression/test_zero_forms.py:32: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________________ test_dsn[False-domains1] ____________________________________________________________ one = Constant(FiniteElement('Real', triangle, 0), 54621), domains = (2, 3) @pytest.mark.parametrize('domains', domains) def test_dsn(one, domains): > assert np.allclose(assemble(one*ds(domains)), len(domains)) tests/regression/test_zero_forms.py:32: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________________ test_dsn[False-domains2] ____________________________________________________________ one = Constant(FiniteElement('Real', triangle, 0), 54621), domains = (3, 4) @pytest.mark.parametrize('domains', domains) def test_dsn(one, domains): > assert np.allclose(assemble(one*ds(domains)), len(domains)) tests/regression/test_zero_forms.py:32: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________________ test_dsn[False-domains3] ____________________________________________________________ one = Constant(FiniteElement('Real', triangle, 0), 54621), domains = (4, 1) @pytest.mark.parametrize('domains', domains) def test_dsn(one, domains): > assert np.allclose(assemble(one*ds(domains)), len(domains)) tests/regression/test_zero_forms.py:32: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________________ test_dsn[False-domains4] ____________________________________________________________ one = Constant(FiniteElement('Real', triangle, 0), 54621), domains = (1, 2, 3, 4) @pytest.mark.parametrize('domains', domains) def test_dsn(one, domains): > assert np.allclose(assemble(one*ds(domains)), len(domains)) tests/regression/test_zero_forms.py:32: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________________ test_dsn_parallel[False] ____________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________ test_math_functions[False-f-1-function-scalar] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = 1, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[False-f-1-function-vector] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = 1, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[False-f-1-function-tensor] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = 1, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[False-f-1-constant-scalar] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = 1, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[False-f-1-constant-vector] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = 1, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[False-f-1-constant-tensor] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = 1, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[False-f-10-function-scalar] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = 10, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[False-f-10-function-vector] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = 10, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[False-f-10-function-tensor] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = 10, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[False-f-10-constant-scalar] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = 10, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[False-f-10-constant-vector] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = 10, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[False-f-10-constant-tensor] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = 10, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[False-f-20-function-scalar] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = 20, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[False-f-20-function-vector] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = 20, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[False-f-20-function-tensor] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = 20, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[False-f-20-constant-scalar] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = 20, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[False-f-20-constant-vector] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = 20, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[False-f-20-constant-tensor] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = 20, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[False-f--1-function-scalar] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = -1, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[False-f--1-function-vector] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = -1, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[False-f--1-function-tensor] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = -1, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[False-f--1-constant-scalar] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = -1, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[False-f--1-constant-vector] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = -1, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[False-f--1-constant-tensor] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = -1, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-f--10-function-scalar] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = -10, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-f--10-function-vector] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = -10, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-f--10-function-tensor] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = -10, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-f--10-constant-scalar] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = -10, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-f--10-constant-vector] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = -10, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-f--10-constant-tensor] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = -10, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-f--20-function-scalar] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = -20, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-f--20-function-vector] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = -20, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-f--20-function-tensor] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = -20, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-f--20-constant-scalar] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = -20, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-f--20-constant-vector] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = -20, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-f--20-constant-tensor] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f', value = -20, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-2*f-1-function-scalar] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = 1, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-2*f-1-function-vector] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = 1, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-2*f-1-function-tensor] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = 1, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-2*f-1-constant-scalar] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = 1, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-2*f-1-constant-vector] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = 1, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-2*f-1-constant-tensor] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = 1, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-2*f-10-function-scalar] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = 10, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-2*f-10-function-vector] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = 10, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-2*f-10-function-tensor] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = 10, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-2*f-10-constant-scalar] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = 10, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-2*f-10-constant-vector] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = 10, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-2*f-10-constant-tensor] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = 10, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-2*f-20-function-scalar] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = 20, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-2*f-20-function-vector] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = 20, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-2*f-20-function-tensor] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = 20, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-2*f-20-constant-scalar] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = 20, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-2*f-20-constant-vector] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = 20, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-2*f-20-constant-tensor] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = 20, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-2*f--1-function-scalar] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = -1, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-2*f--1-function-vector] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = -1, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-2*f--1-function-tensor] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = -1, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-2*f--1-constant-scalar] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = -1, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-2*f--1-constant-vector] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = -1, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[False-2*f--1-constant-tensor] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = -1, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ test_math_functions[False-2*f--10-function-scalar] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = -10, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ test_math_functions[False-2*f--10-function-vector] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = -10, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ test_math_functions[False-2*f--10-function-tensor] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = -10, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ test_math_functions[False-2*f--10-constant-scalar] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = -10, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ test_math_functions[False-2*f--10-constant-vector] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = -10, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ test_math_functions[False-2*f--10-constant-tensor] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = -10, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ test_math_functions[False-2*f--20-function-scalar] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = -20, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ test_math_functions[False-2*f--20-function-vector] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = -20, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ test_math_functions[False-2*f--20-function-tensor] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = -20, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ test_math_functions[False-2*f--20-constant-scalar] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = -20, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ test_math_functions[False-2*f--20-constant-vector] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = -20, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ test_math_functions[False-2*f--20-constant-tensor] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2*f', value = -20, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[False-tanh(f)-1-function-scalar] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = 1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[False-tanh(f)-1-function-vector] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = 1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[False-tanh(f)-1-function-tensor] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = 1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[False-tanh(f)-1-constant-scalar] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = 1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[False-tanh(f)-1-constant-vector] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = 1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[False-tanh(f)-1-constant-tensor] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = 1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[False-tanh(f)-10-function-scalar] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = 10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[False-tanh(f)-10-function-vector] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = 10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[False-tanh(f)-10-function-tensor] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = 10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[False-tanh(f)-10-constant-scalar] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = 10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[False-tanh(f)-10-constant-vector] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = 10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[False-tanh(f)-10-constant-tensor] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = 10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[False-tanh(f)-20-function-scalar] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = 20, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[False-tanh(f)-20-function-vector] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = 20, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[False-tanh(f)-20-function-tensor] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = 20, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[False-tanh(f)-20-constant-scalar] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = 20, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[False-tanh(f)-20-constant-vector] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = 20, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[False-tanh(f)-20-constant-tensor] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = 20, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[False-tanh(f)--1-function-scalar] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = -1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[False-tanh(f)--1-function-vector] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = -1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[False-tanh(f)--1-function-tensor] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = -1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[False-tanh(f)--1-constant-scalar] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = -1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[False-tanh(f)--1-constant-vector] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = -1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[False-tanh(f)--1-constant-tensor] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = -1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-tanh(f)--10-function-scalar] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = -10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-tanh(f)--10-function-vector] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = -10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-tanh(f)--10-function-tensor] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = -10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-tanh(f)--10-constant-scalar] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = -10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-tanh(f)--10-constant-vector] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = -10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-tanh(f)--10-constant-tensor] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = -10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-tanh(f)--20-function-scalar] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = -20, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-tanh(f)--20-function-vector] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = -20, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-tanh(f)--20-function-tensor] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = -20, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-tanh(f)--20-constant-scalar] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = -20, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-tanh(f)--20-constant-vector] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = -20, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-tanh(f)--20-constant-tensor] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f)', value = -20, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-2 * tanh(f)-1-function-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = 1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-2 * tanh(f)-1-function-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = 1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-2 * tanh(f)-1-function-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = 1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-2 * tanh(f)-1-constant-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = 1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-2 * tanh(f)-1-constant-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = 1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-2 * tanh(f)-1-constant-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = 1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-2 * tanh(f)-10-function-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = 10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-2 * tanh(f)-10-function-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = 10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-2 * tanh(f)-10-function-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = 10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-2 * tanh(f)-10-constant-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = 10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-2 * tanh(f)-10-constant-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = 10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-2 * tanh(f)-10-constant-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = 10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-2 * tanh(f)-20-function-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = 20, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-2 * tanh(f)-20-function-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = 20, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-2 * tanh(f)-20-function-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = 20, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-2 * tanh(f)-20-constant-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = 20, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-2 * tanh(f)-20-constant-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = 20, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-2 * tanh(f)-20-constant-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = 20, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-2 * tanh(f)--1-function-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = -1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-2 * tanh(f)--1-function-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = -1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-2 * tanh(f)--1-function-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = -1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-2 * tanh(f)--1-constant-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = -1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-2 * tanh(f)--1-constant-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = -1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-2 * tanh(f)--1-constant-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = -1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[False-2 * tanh(f)--10-function-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = -10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[False-2 * tanh(f)--10-function-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = -10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[False-2 * tanh(f)--10-function-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = -10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[False-2 * tanh(f)--10-constant-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = -10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[False-2 * tanh(f)--10-constant-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = -10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[False-2 * tanh(f)--10-constant-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = -10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[False-2 * tanh(f)--20-function-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = -20, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[False-2 * tanh(f)--20-function-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = -20, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[False-2 * tanh(f)--20-function-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = -20, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[False-2 * tanh(f)--20-constant-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = -20, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[False-2 * tanh(f)--20-constant-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = -20, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[False-2 * tanh(f)--20-constant-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '2 * tanh(f)', value = -20, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-f + tanh(f)-1-function-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = 1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-f + tanh(f)-1-function-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = 1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-f + tanh(f)-1-function-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = 1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-f + tanh(f)-1-constant-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = 1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-f + tanh(f)-1-constant-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = 1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-f + tanh(f)-1-constant-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = 1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-f + tanh(f)-10-function-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = 10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-f + tanh(f)-10-function-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = 10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-f + tanh(f)-10-function-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = 10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-f + tanh(f)-10-constant-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = 10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-f + tanh(f)-10-constant-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = 10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-f + tanh(f)-10-constant-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = 10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-f + tanh(f)-20-function-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = 20, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-f + tanh(f)-20-function-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = 20, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-f + tanh(f)-20-function-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = 20, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-f + tanh(f)-20-constant-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = 20, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-f + tanh(f)-20-constant-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = 20, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-f + tanh(f)-20-constant-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = 20, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-f + tanh(f)--1-function-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = -1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-f + tanh(f)--1-function-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = -1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-f + tanh(f)--1-function-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = -1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-f + tanh(f)--1-constant-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = -1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-f + tanh(f)--1-constant-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = -1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-f + tanh(f)--1-constant-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = -1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[False-f + tanh(f)--10-function-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = -10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[False-f + tanh(f)--10-function-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = -10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[False-f + tanh(f)--10-function-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = -10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[False-f + tanh(f)--10-constant-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = -10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[False-f + tanh(f)--10-constant-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = -10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[False-f + tanh(f)--10-constant-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = -10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[False-f + tanh(f)--20-function-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = -20, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[False-f + tanh(f)--20-function-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = -20, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[False-f + tanh(f)--20-function-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = -20, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[False-f + tanh(f)--20-constant-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = -20, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[False-f + tanh(f)--20-constant-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = -20, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[False-f + tanh(f)--20-constant-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'f + tanh(f)', value = -20, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[False-cos(f) + sin(f)-1-function-scalar] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = 1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[False-cos(f) + sin(f)-1-function-vector] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = 1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[False-cos(f) + sin(f)-1-function-tensor] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = 1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[False-cos(f) + sin(f)-1-constant-scalar] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = 1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[False-cos(f) + sin(f)-1-constant-vector] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = 1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[False-cos(f) + sin(f)-1-constant-tensor] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = 1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[False-cos(f) + sin(f)-10-function-scalar] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = 10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[False-cos(f) + sin(f)-10-function-vector] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = 10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[False-cos(f) + sin(f)-10-function-tensor] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = 10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[False-cos(f) + sin(f)-10-constant-scalar] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = 10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[False-cos(f) + sin(f)-10-constant-vector] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = 10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[False-cos(f) + sin(f)-10-constant-tensor] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = 10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[False-cos(f) + sin(f)-20-function-scalar] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = 20, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[False-cos(f) + sin(f)-20-function-vector] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = 20, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[False-cos(f) + sin(f)-20-function-tensor] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = 20, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[False-cos(f) + sin(f)-20-constant-scalar] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = 20, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[False-cos(f) + sin(f)-20-constant-vector] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = 20, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[False-cos(f) + sin(f)-20-constant-tensor] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = 20, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[False-cos(f) + sin(f)--1-function-scalar] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = -1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[False-cos(f) + sin(f)--1-function-vector] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = -1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[False-cos(f) + sin(f)--1-function-tensor] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = -1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[False-cos(f) + sin(f)--1-constant-scalar] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = -1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[False-cos(f) + sin(f)--1-constant-vector] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = -1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[False-cos(f) + sin(f)--1-constant-tensor] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = -1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[False-cos(f) + sin(f)--10-function-scalar] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = -10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[False-cos(f) + sin(f)--10-function-vector] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = -10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[False-cos(f) + sin(f)--10-function-tensor] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = -10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[False-cos(f) + sin(f)--10-constant-scalar] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = -10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[False-cos(f) + sin(f)--10-constant-vector] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = -10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[False-cos(f) + sin(f)--10-constant-tensor] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = -10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[False-cos(f) + sin(f)--20-function-scalar] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = -20, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[False-cos(f) + sin(f)--20-function-vector] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = -20, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[False-cos(f) + sin(f)--20-function-tensor] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = -20, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[False-cos(f) + sin(f)--20-constant-scalar] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = -20, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[False-cos(f) + sin(f)--20-constant-vector] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = -20, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[False-cos(f) + sin(f)--20-constant-tensor] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f) + sin(f)', value = -20, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)-1-function-scalar] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 1 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)-1-function-vector] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 1 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)-1-function-tensor] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 1 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)-1-constant-scalar] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 1 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)-1-constant-vector] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 1 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)-1-constant-tensor] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 1 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)-10-function-scalar] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 10 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)-10-function-vector] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 10 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)-10-function-tensor] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 10 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)-10-constant-scalar] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 10 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)-10-constant-vector] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 10 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)-10-constant-tensor] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 10 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)-20-function-scalar] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 20 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)-20-function-vector] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 20 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)-20-function-tensor] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 20 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)-20-constant-scalar] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 20 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)-20-constant-vector] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 20 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)-20-constant-tensor] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 20 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)--1-function-scalar] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -1 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)--1-function-vector] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -1 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)--1-function-tensor] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -1 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)--1-constant-scalar] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -1 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)--1-constant-vector] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -1 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)--1-constant-tensor] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -1 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)--10-function-scalar] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -10 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)--10-function-vector] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -10 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)--10-function-tensor] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -10 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)--10-constant-scalar] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -10 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)--10-constant-vector] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -10 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)--10-constant-tensor] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -10 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)--20-function-scalar] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -20 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)--20-function-vector] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -20 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)--20-function-tensor] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -20 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)--20-constant-scalar] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -20 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)--20-constant-vector] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -20 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________ test_math_functions[False-cos(f)*cos(f) + sin(f)*sin(f)--20-constant-tensor] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -20 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)-1-function-scalar] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = 1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)-1-function-vector] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = 1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)-1-function-tensor] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = 1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)-1-constant-scalar] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = 1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)-1-constant-vector] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = 1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)-1-constant-tensor] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = 1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)-10-function-scalar] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = 10 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)-10-function-vector] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = 10 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)-10-function-tensor] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = 10 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)-10-constant-scalar] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = 10 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)-10-constant-vector] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = 10 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)-10-constant-tensor] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = 10 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)-20-function-scalar] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = 20 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)-20-function-vector] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = 20 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)-20-function-tensor] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = 20 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)-20-constant-scalar] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = 20 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)-20-constant-vector] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = 20 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)-20-constant-tensor] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = 20 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)--1-function-scalar] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = -1 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)--1-function-vector] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = -1 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)--1-function-tensor] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = -1 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)--1-constant-scalar] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = -1 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)--1-constant-vector] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = -1 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)--1-constant-tensor] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = -1 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)--10-function-scalar] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = -10 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)--10-function-vector] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = -10 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)--10-function-tensor] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = -10 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)--10-constant-scalar] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = -10 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)--10-constant-vector] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = -10 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)--10-constant-tensor] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = -10 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)--20-function-scalar] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = -20 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)--20-function-vector] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = -20 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)--20-function-tensor] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = -20 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)--20-constant-scalar] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = -20 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)--20-constant-vector] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = -20 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________ test_math_functions[False-tanh(f) + cos(f) + sin(f)--20-constant-tensor] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'tanh(f) + cos(f) + sin(f)', value = -20 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f-1-function-scalar] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f-1-function-vector] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f-1-function-tensor] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f-1-constant-scalar] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f-1-constant-vector] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f-1-constant-tensor] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f-10-function-scalar] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f-10-function-vector] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f-10-function-tensor] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f-10-constant-scalar] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f-10-constant-vector] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f-10-constant-tensor] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f-20-function-scalar] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = 20, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f-20-function-vector] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = 20, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f-20-function-tensor] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = 20, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f-20-constant-scalar] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = 20, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f-20-constant-vector] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = 20, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f-20-constant-tensor] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = 20, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f--1-function-scalar] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f--1-function-vector] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f--1-function-tensor] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f--1-constant-scalar] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f--1-constant-vector] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f--1-constant-tensor] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f--10-function-scalar] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f--10-function-vector] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f--10-function-tensor] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f--10-constant-scalar] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f--10-constant-vector] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f--10-constant-tensor] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f--20-function-scalar] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = -20, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f--20-function-vector] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = -20, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f--20-function-tensor] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = -20, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f--20-constant-scalar] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = -20, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f--20-constant-vector] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = -20, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________ test_math_functions[False-1.0/tanh(f) + 1.0/f--20-constant-tensor] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(f) + 1.0/f', value = -20, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-sqrt(f*f)-1-function-scalar] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = 1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-sqrt(f*f)-1-function-vector] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = 1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-sqrt(f*f)-1-function-tensor] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = 1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-sqrt(f*f)-1-constant-scalar] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = 1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-sqrt(f*f)-1-constant-vector] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = 1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-sqrt(f*f)-1-constant-tensor] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = 1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-sqrt(f*f)-10-function-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = 10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-sqrt(f*f)-10-function-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = 10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-sqrt(f*f)-10-function-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = 10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-sqrt(f*f)-10-constant-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = 10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-sqrt(f*f)-10-constant-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = 10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-sqrt(f*f)-10-constant-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = 10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-sqrt(f*f)-20-function-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = 20, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-sqrt(f*f)-20-function-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = 20, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-sqrt(f*f)-20-function-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = 20, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-sqrt(f*f)-20-constant-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = 20, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-sqrt(f*f)-20-constant-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = 20, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-sqrt(f*f)-20-constant-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = 20, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-sqrt(f*f)--1-function-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = -1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-sqrt(f*f)--1-function-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = -1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-sqrt(f*f)--1-function-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = -1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-sqrt(f*f)--1-constant-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = -1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-sqrt(f*f)--1-constant-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = -1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[False-sqrt(f*f)--1-constant-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = -1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-sqrt(f*f)--10-function-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = -10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-sqrt(f*f)--10-function-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = -10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-sqrt(f*f)--10-function-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = -10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-sqrt(f*f)--10-constant-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = -10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-sqrt(f*f)--10-constant-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = -10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-sqrt(f*f)--10-constant-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = -10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-sqrt(f*f)--20-function-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = -20, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-sqrt(f*f)--20-function-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = -20, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-sqrt(f*f)--20-function-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = -20, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-sqrt(f*f)--20-constant-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = -20, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-sqrt(f*f)--20-constant-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = -20, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[False-sqrt(f*f)--20-constant-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = 'sqrt(f*f)', value = -20, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-1-function-scalar] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 1 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-1-function-vector] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 1 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-1-function-tensor] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 1 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-1-constant-scalar] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 1 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-1-constant-vector] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 1 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-1-constant-tensor] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 1 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-10-function-scalar] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 10 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-10-function-vector] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 10 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-10-function-tensor] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 10 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-10-constant-scalar] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 10 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-10-constant-vector] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 10 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-10-constant-tensor] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 10 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-20-function-scalar] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 20 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-20-function-vector] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 20 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-20-function-tensor] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 20 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-20-constant-scalar] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 20 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-20-constant-vector] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 20 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-20-constant-tensor] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 20 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--1-function-scalar] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -1 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--1-function-vector] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -1 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--1-function-tensor] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -1 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--1-constant-scalar] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -1 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--1-constant-vector] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -1 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--1-constant-tensor] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -1 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--10-function-scalar] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -10 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--10-function-vector] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -10 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--10-function-tensor] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -10 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--10-constant-scalar] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -10 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--10-constant-vector] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -10 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--10-constant-tensor] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -10 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--20-function-scalar] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -20 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--20-function-vector] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -20 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--20-function-tensor] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -20 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--20-constant-scalar] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -20 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--20-constant-vector] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -20 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________ test_math_functions[False-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--20-constant-tensor] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 35532), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -20 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________________ test_ds_dx[True] ________________________________________________________________ one = Constant(FiniteElement('Real', quadrilateral, 0), 55904) def test_ds_dx(one): > assert np.allclose(assemble(one*dx + one*ds), 5.0) tests/regression/test_zero_forms.py:26: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________________________ test_dsn[True-domains0] ____________________________________________________________ one = Constant(FiniteElement('Real', quadrilateral, 0), 55904), domains = (1, 2) @pytest.mark.parametrize('domains', domains) def test_dsn(one, domains): > assert np.allclose(assemble(one*ds(domains)), len(domains)) tests/regression/test_zero_forms.py:32: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________________________ test_dsn[True-domains1] ____________________________________________________________ one = Constant(FiniteElement('Real', quadrilateral, 0), 55904), domains = (2, 3) @pytest.mark.parametrize('domains', domains) def test_dsn(one, domains): > assert np.allclose(assemble(one*ds(domains)), len(domains)) tests/regression/test_zero_forms.py:32: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________________________ test_dsn[True-domains2] ____________________________________________________________ one = Constant(FiniteElement('Real', quadrilateral, 0), 55904), domains = (3, 4) @pytest.mark.parametrize('domains', domains) def test_dsn(one, domains): > assert np.allclose(assemble(one*ds(domains)), len(domains)) tests/regression/test_zero_forms.py:32: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________________________ test_dsn[True-domains3] ____________________________________________________________ one = Constant(FiniteElement('Real', quadrilateral, 0), 55904), domains = (4, 1) @pytest.mark.parametrize('domains', domains) def test_dsn(one, domains): > assert np.allclose(assemble(one*ds(domains)), len(domains)) tests/regression/test_zero_forms.py:32: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________________________ test_dsn[True-domains4] ____________________________________________________________ one = Constant(FiniteElement('Real', quadrilateral, 0), 55904), domains = (1, 2, 3, 4) @pytest.mark.parametrize('domains', domains) def test_dsn(one, domains): > assert np.allclose(assemble(one*ds(domains)), len(domains)) tests/regression/test_zero_forms.py:32: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________________________ test_dsn_parallel[True] ____________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _________________________________________________ test_math_functions[True-f-1-function-scalar] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = 1, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_math_functions[True-f-1-function-vector] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = 1, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_math_functions[True-f-1-function-tensor] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = 1, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_math_functions[True-f-1-constant-scalar] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = 1, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_math_functions[True-f-1-constant-vector] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = 1, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_math_functions[True-f-1-constant-tensor] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = 1, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f-10-function-scalar] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = 10, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f-10-function-vector] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = 10, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f-10-function-tensor] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = 10, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f-10-constant-scalar] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = 10, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f-10-constant-vector] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = 10, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f-10-constant-tensor] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = 10, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f-20-function-scalar] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = 20, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f-20-function-vector] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = 20, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f-20-function-tensor] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = 20, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f-20-constant-scalar] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = 20, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f-20-constant-vector] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = 20, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f-20-constant-tensor] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = 20, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f--1-function-scalar] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = -1, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f--1-function-vector] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = -1, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f--1-function-tensor] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = -1, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f--1-constant-scalar] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = -1, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f--1-constant-vector] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = -1, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f--1-constant-tensor] _________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = -1, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f--10-function-scalar] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = -10, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f--10-function-vector] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = -10, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f--10-function-tensor] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = -10, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f--10-constant-scalar] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = -10, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f--10-constant-vector] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = -10, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f--10-constant-tensor] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = -10, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f--20-function-scalar] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = -20, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f--20-function-vector] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = -20, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f--20-function-tensor] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = -20, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f--20-constant-scalar] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = -20, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f--20-constant-vector] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = -20, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-f--20-constant-tensor] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f', value = -20, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-2*f-1-function-scalar] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = 1, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-2*f-1-function-vector] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = 1, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-2*f-1-function-tensor] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = 1, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-2*f-1-constant-scalar] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = 1, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-2*f-1-constant-vector] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = 1, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_math_functions[True-2*f-1-constant-tensor] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = 1, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f-10-function-scalar] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = 10, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f-10-function-vector] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = 10, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f-10-function-tensor] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = 10, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f-10-constant-scalar] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = 10, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f-10-constant-vector] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = 10, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f-10-constant-tensor] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = 10, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f-20-function-scalar] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = 20, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f-20-function-vector] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = 20, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f-20-function-tensor] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = 20, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f-20-constant-scalar] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = 20, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f-20-constant-vector] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = 20, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f-20-constant-tensor] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = 20, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f--1-function-scalar] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = -1, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f--1-function-vector] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = -1, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f--1-function-tensor] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = -1, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f--1-constant-scalar] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = -1, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f--1-constant-vector] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = -1, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f--1-constant-tensor] ________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = -1, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f--10-function-scalar] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = -10, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f--10-function-vector] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = -10, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f--10-function-tensor] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = -10, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f--10-constant-scalar] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = -10, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f--10-constant-vector] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = -10, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f--10-constant-tensor] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = -10, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f--20-function-scalar] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = -20, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f--20-function-vector] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = -20, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f--20-function-tensor] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = -20, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f--20-constant-scalar] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = -20, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f--20-constant-vector] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = -20, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________ test_math_functions[True-2*f--20-constant-tensor] _______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2*f', value = -20, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ test_math_functions[True-tanh(f)-1-function-scalar] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = 1, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ test_math_functions[True-tanh(f)-1-function-vector] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = 1, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ test_math_functions[True-tanh(f)-1-function-tensor] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = 1, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ test_math_functions[True-tanh(f)-1-constant-scalar] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = 1, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ test_math_functions[True-tanh(f)-1-constant-vector] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = 1, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ test_math_functions[True-tanh(f)-1-constant-tensor] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = 1, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)-10-function-scalar] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = 10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)-10-function-vector] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = 10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)-10-function-tensor] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = 10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)-10-constant-scalar] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = 10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)-10-constant-vector] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = 10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)-10-constant-tensor] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = 10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)-20-function-scalar] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = 20, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)-20-function-vector] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = 20, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)-20-function-tensor] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = 20, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)-20-constant-scalar] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = 20, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)-20-constant-vector] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = 20, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)-20-constant-tensor] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = 20, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)--1-function-scalar] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = -1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)--1-function-vector] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = -1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)--1-function-tensor] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = -1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)--1-constant-scalar] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = -1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)--1-constant-vector] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = -1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)--1-constant-tensor] ______________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = -1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)--10-function-scalar] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = -10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)--10-function-vector] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = -10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)--10-function-tensor] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = -10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)--10-constant-scalar] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = -10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)--10-constant-vector] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = -10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)--10-constant-tensor] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = -10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)--20-function-scalar] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = -20, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)--20-function-vector] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = -20, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)--20-function-tensor] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = -20, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)--20-constant-scalar] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = -20, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)--20-constant-vector] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = -20, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-tanh(f)--20-constant-tensor] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f)', value = -20, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-2 * tanh(f)-1-function-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = 1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-2 * tanh(f)-1-function-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = 1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-2 * tanh(f)-1-function-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = 1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-2 * tanh(f)-1-constant-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = 1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-2 * tanh(f)-1-constant-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = 1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-2 * tanh(f)-1-constant-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = 1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)-10-function-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = 10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)-10-function-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = 10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)-10-function-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = 10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)-10-constant-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = 10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)-10-constant-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = 10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)-10-constant-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = 10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)-20-function-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = 20, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)-20-function-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = 20, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)-20-function-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = 20, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)-20-constant-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = 20, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)-20-constant-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = 20, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)-20-constant-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = 20, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)--1-function-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = -1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)--1-function-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = -1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)--1-function-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = -1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)--1-constant-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = -1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)--1-constant-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = -1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)--1-constant-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = -1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)--10-function-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = -10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)--10-function-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = -10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)--10-function-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = -10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)--10-constant-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = -10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)--10-constant-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = -10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)--10-constant-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = -10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)--20-function-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = -20, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)--20-function-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = -20, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)--20-function-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = -20, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)--20-constant-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = -20, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)--20-constant-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = -20, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-2 * tanh(f)--20-constant-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '2 * tanh(f)', value = -20, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-f + tanh(f)-1-function-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = 1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-f + tanh(f)-1-function-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = 1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-f + tanh(f)-1-function-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = 1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-f + tanh(f)-1-constant-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = 1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-f + tanh(f)-1-constant-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = 1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-f + tanh(f)-1-constant-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = 1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)-10-function-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = 10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)-10-function-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = 10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)-10-function-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = 10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)-10-constant-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = 10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)-10-constant-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = 10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)-10-constant-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = 10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)-20-function-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = 20, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)-20-function-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = 20, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)-20-function-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = 20, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)-20-constant-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = 20, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)-20-constant-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = 20, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)-20-constant-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = 20, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)--1-function-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = -1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)--1-function-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = -1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)--1-function-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = -1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)--1-constant-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = -1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)--1-constant-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = -1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)--1-constant-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = -1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)--10-function-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = -10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)--10-function-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = -10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)--10-function-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = -10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)--10-constant-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = -10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)--10-constant-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = -10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)--10-constant-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = -10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)--20-function-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = -20, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)--20-function-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = -20, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)--20-function-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = -20, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)--20-constant-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = -20, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)--20-constant-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = -20, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________ test_math_functions[True-f + tanh(f)--20-constant-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'f + tanh(f)', value = -20, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[True-cos(f) + sin(f)-1-function-scalar] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = 1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[True-cos(f) + sin(f)-1-function-vector] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = 1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[True-cos(f) + sin(f)-1-function-tensor] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = 1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[True-cos(f) + sin(f)-1-constant-scalar] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = 1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[True-cos(f) + sin(f)-1-constant-vector] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = 1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_math_functions[True-cos(f) + sin(f)-1-constant-tensor] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = 1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)-10-function-scalar] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = 10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)-10-function-vector] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = 10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)-10-function-tensor] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = 10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)-10-constant-scalar] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = 10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)-10-constant-vector] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = 10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)-10-constant-tensor] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = 10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)-20-function-scalar] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = 20, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)-20-function-vector] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = 20, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)-20-function-tensor] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = 20, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)-20-constant-scalar] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = 20, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)-20-constant-vector] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = 20, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)-20-constant-tensor] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = 20, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)--1-function-scalar] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = -1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)--1-function-vector] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = -1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)--1-function-tensor] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = -1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)--1-constant-scalar] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = -1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)--1-constant-vector] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = -1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)--1-constant-tensor] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = -1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)--10-function-scalar] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = -10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)--10-function-vector] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = -10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)--10-function-tensor] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = -10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)--10-constant-scalar] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = -10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)--10-constant-vector] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = -10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)--10-constant-tensor] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = -10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)--20-function-scalar] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = -20, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)--20-function-vector] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = -20, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)--20-function-tensor] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = -20, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)--20-constant-scalar] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = -20, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)--20-constant-vector] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = -20, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_math_functions[True-cos(f) + sin(f)--20-constant-tensor] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f) + sin(f)', value = -20, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)-1-function-scalar] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 1 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)-1-function-vector] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 1 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)-1-function-tensor] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 1 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)-1-constant-scalar] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 1 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)-1-constant-vector] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 1 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)-1-constant-tensor] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 1 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)-10-function-scalar] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 10 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)-10-function-vector] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 10 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)-10-function-tensor] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 10 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)-10-constant-scalar] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 10 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)-10-constant-vector] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 10 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)-10-constant-tensor] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 10 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)-20-function-scalar] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 20 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)-20-function-vector] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 20 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)-20-function-tensor] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 20 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)-20-constant-scalar] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 20 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)-20-constant-vector] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 20 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)-20-constant-tensor] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = 20 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)--1-function-scalar] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -1 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)--1-function-vector] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -1 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)--1-function-tensor] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -1 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)--1-constant-scalar] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -1 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)--1-constant-vector] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -1 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)--1-constant-tensor] ___________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -1 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)--10-function-scalar] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -10 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)--10-function-vector] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -10 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)--10-function-tensor] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -10 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)--10-constant-scalar] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -10 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)--10-constant-vector] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -10 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)--10-constant-tensor] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -10 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)--20-function-scalar] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -20 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)--20-function-vector] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -20 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)--20-function-tensor] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -20 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)--20-constant-scalar] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -20 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)--20-constant-vector] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -20 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________ test_math_functions[True-cos(f)*cos(f) + sin(f)*sin(f)--20-constant-tensor] __________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'cos(f)*cos(f) + sin(f)*sin(f)', value = -20 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)-1-function-scalar] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = 1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)-1-function-vector] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = 1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)-1-function-tensor] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = 1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)-1-constant-scalar] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = 1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)-1-constant-vector] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = 1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)-1-constant-tensor] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = 1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)-10-function-scalar] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = 10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)-10-function-vector] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = 10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)-10-function-tensor] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = 10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)-10-constant-scalar] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = 10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)-10-constant-vector] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = 10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)-10-constant-tensor] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = 10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)-20-function-scalar] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = 20, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)-20-function-vector] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = 20, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)-20-function-tensor] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = 20, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)-20-constant-scalar] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = 20, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)-20-constant-vector] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = 20, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)-20-constant-tensor] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = 20, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)--1-function-scalar] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = -1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)--1-function-vector] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = -1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)--1-function-tensor] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = -1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)--1-constant-scalar] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = -1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)--1-constant-vector] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = -1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)--1-constant-tensor] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = -1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)--10-function-scalar] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = -10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)--10-function-vector] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = -10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)--10-function-tensor] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = -10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)--10-constant-scalar] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = -10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)--10-constant-vector] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = -10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)--10-constant-tensor] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = -10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)--20-function-scalar] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = -20, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)--20-function-vector] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = -20, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)--20-function-tensor] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = -20, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)--20-constant-scalar] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = -20, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)--20-constant-vector] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = -20, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_math_functions[True-tanh(f) + cos(f) + sin(f)--20-constant-tensor] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'tanh(f) + cos(f) + sin(f)', value = -20, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f-1-function-scalar] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f-1-function-vector] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f-1-function-tensor] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f-1-constant-scalar] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f-1-constant-vector] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f-1-constant-tensor] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f-10-function-scalar] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f-10-function-vector] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f-10-function-tensor] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f-10-constant-scalar] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f-10-constant-vector] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f-10-constant-tensor] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f-20-function-scalar] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = 20, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f-20-function-vector] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = 20, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f-20-function-tensor] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = 20, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f-20-constant-scalar] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = 20, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f-20-constant-vector] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = 20, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f-20-constant-tensor] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = 20, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f--1-function-scalar] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f--1-function-vector] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f--1-function-tensor] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f--1-constant-scalar] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f--1-constant-vector] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f--1-constant-tensor] ________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f--10-function-scalar] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f--10-function-vector] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f--10-function-tensor] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f--10-constant-scalar] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f--10-constant-vector] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f--10-constant-tensor] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f--20-function-scalar] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = -20, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f--20-function-vector] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = -20, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f--20-function-tensor] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = -20, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f--20-constant-scalar] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = -20, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f--20-constant-vector] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = -20, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________ test_math_functions[True-1.0/tanh(f) + 1.0/f--20-constant-tensor] _______________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(f) + 1.0/f', value = -20, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-sqrt(f*f)-1-function-scalar] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = 1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-sqrt(f*f)-1-function-vector] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = 1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-sqrt(f*f)-1-function-tensor] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = 1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-sqrt(f*f)-1-constant-scalar] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = 1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-sqrt(f*f)-1-constant-vector] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = 1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________ test_math_functions[True-sqrt(f*f)-1-constant-tensor] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = 1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)-10-function-scalar] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = 10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)-10-function-vector] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = 10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)-10-function-tensor] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = 10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)-10-constant-scalar] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = 10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)-10-constant-vector] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = 10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)-10-constant-tensor] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = 10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)-20-function-scalar] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = 20, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)-20-function-vector] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = 20, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)-20-function-tensor] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = 20, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)-20-constant-scalar] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = 20, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)-20-constant-vector] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = 20, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)-20-constant-tensor] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = 20, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)--1-function-scalar] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = -1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)--1-function-vector] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = -1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)--1-function-tensor] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = -1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)--1-constant-scalar] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = -1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)--1-constant-vector] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = -1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)--1-constant-tensor] _____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = -1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)--10-function-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = -10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)--10-function-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = -10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)--10-function-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = -10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)--10-constant-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = -10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)--10-constant-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = -10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)--10-constant-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = -10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)--20-function-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = -20, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)--20-function-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = -20, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)--20-function-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = -20, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)--20-constant-scalar] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = -20, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)--20-constant-vector] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = -20, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_math_functions[True-sqrt(f*f)--20-constant-tensor] ____________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = 'sqrt(f*f)', value = -20, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-1-function-scalar] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 1 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-1-function-vector] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 1 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-1-function-tensor] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 1 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-1-constant-scalar] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 1 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-1-constant-vector] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 1 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-1-constant-tensor] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 1 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-10-function-scalar] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 10 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-10-function-vector] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 10 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-10-function-tensor] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 10 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-10-constant-scalar] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 10 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-10-constant-vector] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 10 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-10-constant-tensor] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 10 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-20-function-scalar] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 20 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-20-function-vector] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 20 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-20-function-tensor] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 20 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-20-constant-scalar] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 20 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-20-constant-vector] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 20 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)-20-constant-tensor] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = 20 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--1-function-scalar] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -1 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--1-function-vector] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -1 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--1-function-tensor] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -1 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--1-constant-scalar] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -1 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--1-constant-vector] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -1 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--1-constant-tensor] ______________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -1 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--10-function-scalar] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -10 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--10-function-vector] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -10 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--10-function-tensor] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -10 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--10-constant-scalar] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -10 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--10-constant-vector] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -10 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--10-constant-tensor] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -10 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--20-function-scalar] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -20 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--20-function-vector] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -20 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--20-function-tensor] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -20 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/regression/test_zero_forms.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--20-constant-scalar] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -20 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--20-constant-vector] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -20 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________ test_math_functions[True-1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)--20-constant-tensor] _____________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 35930), expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -20 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2*f', 'tanh(f)', '2 * tanh(f)', 'f + tanh(f)', 'cos(f) + sin(f)', 'cos(f)*cos(f) + sin(f)*sin(f)', 'tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f', 'sqrt(f*f)', '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'], [1, 10, 20, -1, -10, -20], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_math_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(eval(expr)*dx) tests/regression/test_zero_forms.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________________ test_empty_integrand ______________________________________________________________ def test_empty_integrand(): mesh = UnitSquareMesh(5, 5) P1 = FiniteElement("CG", triangle, 1) B = FiniteElement("B", triangle, 3) Mini = FunctionSpace(mesh, P1+B) u = TrialFunction(Mini) v = TestFunction(Mini) sol = Function(Mini) f = Function(Mini) > f.assign(1) tests/regression/test_zero_integrand.py:16: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________________ test_assemble_matrix[cg1-False] ________________________________________________________ rank_two_tensor = Matrix(Form([Integral(Product(Argument(WithGeometry(FunctionSpace( M = assemble(rank_two_tensor) tests/slate/test_assemble_tensors.py:116: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________________ test_assemble_matrix[cg1-True] _________________________________________________________ rank_two_tensor = Matrix(Form([Integral(Product(Argument(WithGeometry(FunctionSpace( M = assemble(rank_two_tensor) tests/slate/test_assemble_tensors.py:116: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________________ test_assemble_matrix[cg2-True] _________________________________________________________ rank_two_tensor = Matrix(Form([Integral(Product(Argument(WithGeometry(FunctionSpace( M = assemble(rank_two_tensor) tests/slate/test_assemble_tensors.py:116: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________________ test_assemble_matrix[cg2-False] ________________________________________________________ rank_two_tensor = Matrix(Form([Integral(Product(Argument(WithGeometry(FunctionSpace( M = assemble(rank_two_tensor) tests/slate/test_assemble_tensors.py:116: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________________ test_assemble_matrix[dg0-True] _________________________________________________________ rank_two_tensor = Matrix(Form([Integral(Product(Argument(WithGeometry(FunctionSpace( M = assemble(rank_two_tensor) tests/slate/test_assemble_tensors.py:116: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________________ test_assemble_matrix[dg0-False] ________________________________________________________ rank_two_tensor = Matrix(Form([Integral(Product(Argument(WithGeometry(FunctionSpace( M = assemble(rank_two_tensor) tests/slate/test_assemble_tensors.py:116: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________________ test_assemble_matrix[dg1-True] _________________________________________________________ rank_two_tensor = Matrix(Form([Integral(Product(Argument(WithGeometry(FunctionSpace( M = assemble(rank_two_tensor) tests/slate/test_assemble_tensors.py:116: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________________ test_assemble_matrix[dg1-False] ________________________________________________________ rank_two_tensor = Matrix(Form([Integral(Product(Argument(WithGeometry(FunctionSpace( M = assemble(rank_two_tensor) tests/slate/test_assemble_tensors.py:116: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________________ test_assemble_matrix[vcg1-True] ________________________________________________________ rank_two_tensor = Matrix(Form([Integral(Conj(Inner(Argument(WithGeometry(FunctionSpace( M = assemble(rank_two_tensor) tests/slate/test_assemble_tensors.py:116: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________ test_assemble_matrix[vcg1-False] ________________________________________________________ rank_two_tensor = Matrix(Form([Integral(Conj(Inner(Argument(WithGeometry(FunctionSpace( M = assemble(rank_two_tensor) tests/slate/test_assemble_tensors.py:116: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________________ test_assemble_matrix[vcg2-True] ________________________________________________________ rank_two_tensor = Matrix(Form([Integral(Conj(Inner(Argument(WithGeometry(FunctionSpace( M = assemble(rank_two_tensor) tests/slate/test_assemble_tensors.py:116: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________ test_assemble_matrix[vcg2-False] ________________________________________________________ rank_two_tensor = Matrix(Form([Integral(Conj(Inner(Argument(WithGeometry(FunctionSpace( M = assemble(rank_two_tensor) tests/slate/test_assemble_tensors.py:116: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________________ test_assemble_matrix[tcg1-True] ________________________________________________________ rank_two_tensor = Matrix(Form([Integral(Conj(Inner(Argument(WithGeometry(FunctionSpace( M = assemble(rank_two_tensor) tests/slate/test_assemble_tensors.py:116: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________ test_assemble_matrix[tcg1-False] ________________________________________________________ rank_two_tensor = Matrix(Form([Integral(Conj(Inner(Argument(WithGeometry(FunctionSpace( M = assemble(rank_two_tensor) tests/slate/test_assemble_tensors.py:116: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________________ test_assemble_matrix[tcg2-True] ________________________________________________________ rank_two_tensor = Matrix(Form([Integral(Conj(Inner(Argument(WithGeometry(FunctionSpace( M = assemble(rank_two_tensor) tests/slate/test_assemble_tensors.py:116: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________ test_assemble_matrix[tcg2-False] ________________________________________________________ rank_two_tensor = Matrix(Form([Integral(Conj(Inner(Argument(WithGeometry(FunctionSpace( M = assemble(rank_two_tensor) tests/slate/test_assemble_tensors.py:116: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________________ test_assemble_vector_into_tensor[True] _____________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36459) def test_assemble_vector_into_tensor(mesh): V = FunctionSpace(mesh, "DG", 1) v = TestFunction(V) f = Function(V) # Assemble a SLATE tensor into f > f = assemble(Tensor(v * dx), f) tests/slate/test_assemble_tensors.py:125: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:1765: in zero loop.enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________________ test_assemble_matrix_into_tensor[True] _____________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36459) def test_assemble_matrix_into_tensor(mesh): V = FunctionSpace(mesh, "DG", 0) u = TestFunction(V) v = TrialFunction(V) > M = assemble(Tensor(u * v * dx)) tests/slate/test_assemble_tensors.py:135: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________________ test_mixed_coefficient_matrix[True] ______________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36459) def test_mixed_coefficient_matrix(mesh): V = FunctionSpace(mesh, "CG", 1) U = FunctionSpace(mesh, "DG", 0) W = V * U f = Function(W) > f.assign(1) tests/slate/test_assemble_tensors.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________________ test_mixed_coefficient_scalar[True] ______________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36459) def test_mixed_coefficient_scalar(mesh): V = FunctionSpace(mesh, "DG", 0) W = V * V f = Function(W) g, h = f.split() > f.assign(1) tests/slate/test_assemble_tensors.py:160: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________ test_nested_coefficients_matrix[True] _____________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36459) def test_nested_coefficients_matrix(mesh): V = VectorFunctionSpace(mesh, "CG", 1) U = FunctionSpace(mesh, "CG", 1) > f = Function(U).assign(2.0) tests/slate/test_assemble_tensors.py:167: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_vector_subblocks[True] __________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36459) def test_vector_subblocks(mesh): V = VectorFunctionSpace(mesh, "DG", 1) U = FunctionSpace(mesh, "DG", 1) T = FunctionSpace(mesh, "DG", 0) W = V * U * T x = SpatialCoordinate(mesh) > q = Function(V).project(grad(sin(pi*x[0])*cos(pi*x[1]))) tests/slate/test_assemble_tensors.py:200: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:189: in rhs self.assembler() firedrake/assemble.py:162: in thunk kernel() ../PyOP2/pyop2/base.py:1765: in zero loop.enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_matrix_subblocks[True] __________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36459) def test_matrix_subblocks(mesh): if mesh.ufl_cell() == quadrilateral: U = FunctionSpace(mesh, "RTCF", 1) else: U = FunctionSpace(mesh, "RT", 1) V = FunctionSpace(mesh, "DG", 0) T = FunctionSpace(mesh, "HDiv Trace", 0) n = FacetNormal(mesh) W = U * V * T u, p, lambdar = TrialFunctions(W) w, q, gammar = TestFunctions(W) A = Tensor(inner(u, w)*dx + p*q*dx - div(w)*p*dx + q*div(u)*dx + lambdar('+')*jump(w, n=n)*dS + gammar('+')*jump(u, n=n)*dS + lambdar*gammar*ds) # Test individual blocks indices = [(0, 0), (0, 1), (1, 0), (1, 1), (1, 2), (2, 1), (2, 2)] refs = dict(split_form(A.form)) _A = A.blocks for x, y in indices: > ref = assemble(refs[x, y]).M.values tests/slate/test_assemble_tensors.py:237: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________________ test_assemble_vector_into_tensor[False] ____________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36476) def test_assemble_vector_into_tensor(mesh): V = FunctionSpace(mesh, "DG", 1) v = TestFunction(V) f = Function(V) # Assemble a SLATE tensor into f > f = assemble(Tensor(v * dx), f) tests/slate/test_assemble_tensors.py:125: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:1765: in zero loop.enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________________ test_assemble_matrix_into_tensor[False] ____________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36476) def test_assemble_matrix_into_tensor(mesh): V = FunctionSpace(mesh, "DG", 0) u = TestFunction(V) v = TrialFunction(V) > M = assemble(Tensor(u * v * dx)) tests/slate/test_assemble_tensors.py:135: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________ test_mixed_coefficient_matrix[False] ______________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36476) def test_mixed_coefficient_matrix(mesh): V = FunctionSpace(mesh, "CG", 1) U = FunctionSpace(mesh, "DG", 0) W = V * U f = Function(W) > f.assign(1) tests/slate/test_assemble_tensors.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________ test_mixed_coefficient_scalar[False] ______________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36476) def test_mixed_coefficient_scalar(mesh): V = FunctionSpace(mesh, "DG", 0) W = V * V f = Function(W) g, h = f.split() > f.assign(1) tests/slate/test_assemble_tensors.py:160: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________________ test_nested_coefficients_matrix[False] _____________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36476) def test_nested_coefficients_matrix(mesh): V = VectorFunctionSpace(mesh, "CG", 1) U = FunctionSpace(mesh, "CG", 1) > f = Function(U).assign(2.0) tests/slate/test_assemble_tensors.py:167: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________________ test_vector_subblocks[False] __________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36476) def test_vector_subblocks(mesh): V = VectorFunctionSpace(mesh, "DG", 1) U = FunctionSpace(mesh, "DG", 1) T = FunctionSpace(mesh, "DG", 0) W = V * U * T x = SpatialCoordinate(mesh) > q = Function(V).project(grad(sin(pi*x[0])*cos(pi*x[1]))) tests/slate/test_assemble_tensors.py:200: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:331: in project return projection.project(b, self, *args, **kwargs) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:189: in rhs self.assembler() firedrake/assemble.py:162: in thunk kernel() ../PyOP2/pyop2/base.py:1765: in zero loop.enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________________ test_matrix_subblocks[False] __________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36476) def test_matrix_subblocks(mesh): if mesh.ufl_cell() == quadrilateral: U = FunctionSpace(mesh, "RTCF", 1) else: U = FunctionSpace(mesh, "RT", 1) V = FunctionSpace(mesh, "DG", 0) T = FunctionSpace(mesh, "HDiv Trace", 0) n = FacetNormal(mesh) W = U * V * T u, p, lambdar = TrialFunctions(W) w, q, gammar = TestFunctions(W) A = Tensor(inner(u, w)*dx + p*q*dx - div(w)*p*dx + q*div(u)*dx + lambdar('+')*jump(w, n=n)*dS + gammar('+')*jump(u, n=n)*dS + lambdar*gammar*ds) # Test individual blocks indices = [(0, 0), (0, 1), (1, 0), (1, 1), (1, 2), (2, 1), (2, 2)] refs = dict(split_form(A.form)) _A = A.blocks for x, y in indices: > ref = assemble(refs[x, y]).M.values tests/slate/test_assemble_tensors.py:237: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________________ test_darcy_flow_hybridization[1-RT] ______________________________________________________ degree = 1, hdiv_family = 'RT' @pytest.mark.parametrize(("degree", "hdiv_family"), [(1, "RT"), (1, "BDM")]) def test_darcy_flow_hybridization(degree, hdiv_family): """ Solves Darcy's equation: sigma - grad(u) = 0; div(sigma) = -f, in [0, 1] x [0, 1] u = 0 on {(0, y).union(1, y)} sigma.n = sin(5x) on {(0, x).union(1, x)} """ # Create a mesh mesh = UnitSquareMesh(6, 6) U = FunctionSpace(mesh, hdiv_family, degree) V = FunctionSpace(mesh, "DG", degree - 1) W = U * V sigma, u = TrialFunctions(W) tau, v = TestFunctions(W) n = FacetNormal(mesh) # Define the source function x, y = SpatialCoordinate(mesh) f = Function(V) > f.interpolate(10*exp(-(pow(x - 0.5, 2) + pow(y - 0.5, 2)) / 0.02)) tests/slate/test_darcy_hybridized_mixed.py:27: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________ test_darcy_flow_hybridization[1-BDM] ______________________________________________________ degree = 1, hdiv_family = 'BDM' @pytest.mark.parametrize(("degree", "hdiv_family"), [(1, "RT"), (1, "BDM")]) def test_darcy_flow_hybridization(degree, hdiv_family): """ Solves Darcy's equation: sigma - grad(u) = 0; div(sigma) = -f, in [0, 1] x [0, 1] u = 0 on {(0, y).union(1, y)} sigma.n = sin(5x) on {(0, x).union(1, x)} """ # Create a mesh mesh = UnitSquareMesh(6, 6) U = FunctionSpace(mesh, hdiv_family, degree) V = FunctionSpace(mesh, "DG", degree - 1) W = U * V sigma, u = TrialFunctions(W) tau, v = TestFunctions(W) n = FacetNormal(mesh) # Define the source function x, y = SpatialCoordinate(mesh) f = Function(V) > f.interpolate(10*exp(-(pow(x - 0.5, 2) + pow(y - 0.5, 2)) / 0.02)) tests/slate/test_darcy_hybridized_mixed.py:27: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________________ test_facet_interior_jump[False] ________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36499) def test_facet_interior_jump(mesh): DG = VectorFunctionSpace(mesh, "DG", 1) n = FacetNormal(mesh) u = TestFunction(DG) x, y = SpatialCoordinate(mesh) > f = project(as_vector([x, y]), DG) tests/slate/test_facet_tensors.py:18: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:189: in rhs self.assembler() firedrake/assemble.py:162: in thunk kernel() ../PyOP2/pyop2/base.py:1765: in zero loop.enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________________ test_facet_interior_avg[False] _________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36499) def test_facet_interior_avg(mesh): DG = FunctionSpace(mesh, "DG", 1) u = TestFunction(DG) x, y = SpatialCoordinate(mesh) > f = interpolate(x + y, DG) tests/slate/test_facet_tensors.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_facet_exterior[False] ___________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36499) def test_facet_exterior(mesh): DG = VectorFunctionSpace(mesh, "DG", 1) n = FacetNormal(mesh) u = TestFunction(DG) x, y = SpatialCoordinate(mesh) > f = project(as_vector([x, y]), DG) tests/slate/test_facet_tensors.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:189: in rhs self.assembler() firedrake/assemble.py:162: in thunk kernel() ../PyOP2/pyop2/base.py:1765: in zero loop.enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________________ test_facet_interior_jump[True] _________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36506) def test_facet_interior_jump(mesh): DG = VectorFunctionSpace(mesh, "DG", 1) n = FacetNormal(mesh) u = TestFunction(DG) x, y = SpatialCoordinate(mesh) > f = project(as_vector([x, y]), DG) tests/slate/test_facet_tensors.py:18: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:189: in rhs self.assembler() firedrake/assemble.py:162: in thunk kernel() ../PyOP2/pyop2/base.py:1765: in zero loop.enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________________ test_facet_interior_avg[True] _________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36506) def test_facet_interior_avg(mesh): DG = FunctionSpace(mesh, "DG", 1) u = TestFunction(DG) x, y = SpatialCoordinate(mesh) > f = interpolate(x + y, DG) tests/slate/test_facet_tensors.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________________ test_facet_exterior[True] ___________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36506) def test_facet_exterior(mesh): DG = VectorFunctionSpace(mesh, "DG", 1) n = FacetNormal(mesh) u = TestFunction(DG) x, y = SpatialCoordinate(mesh) > f = project(as_vector([x, y]), DG) tests/slate/test_facet_tensors.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:189: in rhs self.assembler() firedrake/assemble.py:162: in thunk kernel() ../PyOP2/pyop2/base.py:1765: in zero loop.enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________________ test_hdg_convergence[1-False-1.75] _______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_hdg_convergence[1-True-1.75] _______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________________ test_hdg_convergence[2-False-2.75] _______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _______________________________________________________ test_hdg_convergence[2-True-2.75] _______________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ___________________________________________ test_hybrid_conv_parallel[UnitIcosahedralSphereMesh-BDM] ____________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ______________________________________________ test_hybrid_conv_parallel[UnitCubedSphereMesh-RTCF] ______________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError __________________________________________________________ test_left_inverse[False-1] ___________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36519), degree = 1 @pytest.mark.parametrize("degree", range(1, 4)) def test_left_inverse(mesh, degree): """Tests the SLATE expression A.inv * A = I""" V = FunctionSpace(mesh, "DG", degree) u = TrialFunction(V) v = TestFunction(V) form = u*v*dx A = Tensor(form) > Result = assemble(A.inv * A) tests/slate/test_linear_algebra.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_left_inverse[False-2] ___________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36519), degree = 2 @pytest.mark.parametrize("degree", range(1, 4)) def test_left_inverse(mesh, degree): """Tests the SLATE expression A.inv * A = I""" V = FunctionSpace(mesh, "DG", degree) u = TrialFunction(V) v = TestFunction(V) form = u*v*dx A = Tensor(form) > Result = assemble(A.inv * A) tests/slate/test_linear_algebra.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_left_inverse[False-3] ___________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36519), degree = 3 @pytest.mark.parametrize("degree", range(1, 4)) def test_left_inverse(mesh, degree): """Tests the SLATE expression A.inv * A = I""" V = FunctionSpace(mesh, "DG", degree) u = TrialFunction(V) v = TestFunction(V) form = u*v*dx A = Tensor(form) > Result = assemble(A.inv * A) tests/slate/test_linear_algebra.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_right_inverse[False-1] __________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36519), degree = 1 @pytest.mark.parametrize("degree", range(1, 4)) def test_right_inverse(mesh, degree): """Tests the SLATE expression A * A.inv = I""" V = FunctionSpace(mesh, "DG", degree) u = TrialFunction(V) v = TestFunction(V) form = u*v*dx A = Tensor(form) > Result = assemble(A * A.inv) tests/slate/test_linear_algebra.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_right_inverse[False-2] __________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36519), degree = 2 @pytest.mark.parametrize("degree", range(1, 4)) def test_right_inverse(mesh, degree): """Tests the SLATE expression A * A.inv = I""" V = FunctionSpace(mesh, "DG", degree) u = TrialFunction(V) v = TestFunction(V) form = u*v*dx A = Tensor(form) > Result = assemble(A * A.inv) tests/slate/test_linear_algebra.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_right_inverse[False-3] __________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36519), degree = 3 @pytest.mark.parametrize("degree", range(1, 4)) def test_right_inverse(mesh, degree): """Tests the SLATE expression A * A.inv = I""" V = FunctionSpace(mesh, "DG", degree) u = TrialFunction(V) v = TestFunction(V) form = u*v*dx A = Tensor(form) > Result = assemble(A * A.inv) tests/slate/test_linear_algebra.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________________ test_symmetry[False] ______________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36519) def test_symmetry(mesh): """Tests that the SLATE matrices associated with a symmetric bilinear form is symmetric. """ V = FunctionSpace(mesh, "CG", 1) u = TrialFunction(V) v = TestFunction(V) form = u*v*dx + inner(grad(u), grad(v))*dx A = Tensor(form) > M1 = assemble(A) tests/slate/test_linear_algebra.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________________ test_subtract_to_zero[False] __________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36519) def test_subtract_to_zero(mesh): """Tests that subtracting two identical matrices results in the zero matrix. """ V = FunctionSpace(mesh, "CG", 1) u = TrialFunction(V) v = TestFunction(V) form = u*v*dx A = Tensor(form) > M = assemble(A - A) tests/slate/test_linear_algebra.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________________ test_add_the_negative[False] __________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36519) def test_add_the_negative(mesh): """Adding the negative of a matrix gives you the zero matrix. """ V = FunctionSpace(mesh, "CG", 1) u = TrialFunction(V) v = TestFunction(V) form = u*v*dx A = Tensor(form) > M = assemble(A + -A) tests/slate/test_linear_algebra.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________________ test_left_inverse[True-1] ___________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36521), degree = 1 @pytest.mark.parametrize("degree", range(1, 4)) def test_left_inverse(mesh, degree): """Tests the SLATE expression A.inv * A = I""" V = FunctionSpace(mesh, "DG", degree) u = TrialFunction(V) v = TestFunction(V) form = u*v*dx A = Tensor(form) > Result = assemble(A.inv * A) tests/slate/test_linear_algebra.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________________ test_left_inverse[True-2] ___________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36521), degree = 2 @pytest.mark.parametrize("degree", range(1, 4)) def test_left_inverse(mesh, degree): """Tests the SLATE expression A.inv * A = I""" V = FunctionSpace(mesh, "DG", degree) u = TrialFunction(V) v = TestFunction(V) form = u*v*dx A = Tensor(form) > Result = assemble(A.inv * A) tests/slate/test_linear_algebra.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________________ test_left_inverse[True-3] ___________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36521), degree = 3 @pytest.mark.parametrize("degree", range(1, 4)) def test_left_inverse(mesh, degree): """Tests the SLATE expression A.inv * A = I""" V = FunctionSpace(mesh, "DG", degree) u = TrialFunction(V) v = TestFunction(V) form = u*v*dx A = Tensor(form) > Result = assemble(A.inv * A) tests/slate/test_linear_algebra.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_right_inverse[True-1] ___________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36521), degree = 1 @pytest.mark.parametrize("degree", range(1, 4)) def test_right_inverse(mesh, degree): """Tests the SLATE expression A * A.inv = I""" V = FunctionSpace(mesh, "DG", degree) u = TrialFunction(V) v = TestFunction(V) form = u*v*dx A = Tensor(form) > Result = assemble(A * A.inv) tests/slate/test_linear_algebra.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_right_inverse[True-2] ___________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36521), degree = 2 @pytest.mark.parametrize("degree", range(1, 4)) def test_right_inverse(mesh, degree): """Tests the SLATE expression A * A.inv = I""" V = FunctionSpace(mesh, "DG", degree) u = TrialFunction(V) v = TestFunction(V) form = u*v*dx A = Tensor(form) > Result = assemble(A * A.inv) tests/slate/test_linear_algebra.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_right_inverse[True-3] ___________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36521), degree = 3 @pytest.mark.parametrize("degree", range(1, 4)) def test_right_inverse(mesh, degree): """Tests the SLATE expression A * A.inv = I""" V = FunctionSpace(mesh, "DG", degree) u = TrialFunction(V) v = TestFunction(V) form = u*v*dx A = Tensor(form) > Result = assemble(A * A.inv) tests/slate/test_linear_algebra.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________________________ test_symmetry[True] ______________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36521) def test_symmetry(mesh): """Tests that the SLATE matrices associated with a symmetric bilinear form is symmetric. """ V = FunctionSpace(mesh, "CG", 1) u = TrialFunction(V) v = TestFunction(V) form = u*v*dx + inner(grad(u), grad(v))*dx A = Tensor(form) > M1 = assemble(A) tests/slate/test_linear_algebra.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_subtract_to_zero[True] __________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36521) def test_subtract_to_zero(mesh): """Tests that subtracting two identical matrices results in the zero matrix. """ V = FunctionSpace(mesh, "CG", 1) u = TrialFunction(V) v = TestFunction(V) form = u*v*dx A = Tensor(form) > M = assemble(A - A) tests/slate/test_linear_algebra.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_add_the_negative[True] __________________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36521) def test_add_the_negative(mesh): """Adding the negative of a matrix gives you the zero matrix. """ V = FunctionSpace(mesh, "CG", 1) u = TrialFunction(V) v = TestFunction(V) form = u*v*dx A = Tensor(form) > M = assemble(A + -A) tests/slate/test_linear_algebra.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________________ test_aggressive_unaryop_nesting ________________________________________________________ def test_aggressive_unaryop_nesting(): """Test Slate's ability to handle extremely nested expressions. """ V = FunctionSpace(UnitSquareMesh(1, 1), "DG", 3) f = Function(V) g = Function(V) > f.assign(1.0) tests/slate/test_linear_algebra.py:90: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________________ test_local_solve[PartialPivLU] _________________________________________________________ decomp = 'PartialPivLU' @pytest.mark.parametrize("decomp", ["PartialPivLU", "FullPivLU"]) def test_local_solve(decomp): V = FunctionSpace(UnitSquareMesh(3, 3), "DG", 3) > f = Function(V).assign(1.0) tests/slate/test_linear_algebra.py:109: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_local_solve[FullPivLU] __________________________________________________________ decomp = 'FullPivLU' @pytest.mark.parametrize("decomp", ["PartialPivLU", "FullPivLU"]) def test_local_solve(decomp): V = FunctionSpace(UnitSquareMesh(3, 3), "DG", 3) > f = Function(V).assign(1.0) tests/slate/test_linear_algebra.py:109: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________________ test_matrix_free_hybridization _________________________________________________________ def test_matrix_free_hybridization(): # Create a mesh mesh = UnitSquareMesh(6, 6) U = FunctionSpace(mesh, "RT", 1) V = FunctionSpace(mesh, "DG", 0) W = U * V sigma, u = TrialFunctions(W) tau, v = TestFunctions(W) n = FacetNormal(mesh) # Define the source function x, y = SpatialCoordinate(mesh) f = Function(V) > f.interpolate(10*exp(-(pow(x - 0.5, 2) + pow(y - 0.5, 2)) / 0.02)) tests/slate/test_matrix_free_hybridization.py:17: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________________ test_hdiv_element[RT-1-DG-0] __________________________________________________________ hfamily = 'RT', hdegree = 1, vfamily = 'DG', vdegree = 0 @pytest.mark.parametrize(('hfamily', 'hdegree', 'vfamily', 'vdegree'), [(f, d, vf, vd) for (vf, vd) in DG for (f, d) in hdiv] + [(f, d, vf, vd) for (vf, vd) in DG for (f, d) in hcurl] + [(f, d, vf, vd) for (vf, vd) in CG for (f, d) in DG]) def test_hdiv_element(hfamily, hdegree, vfamily, vdegree): > mesh = ExtrudedMesh(UnitSquareMesh(2, 2), layers=1, layer_height=0.25) tests/slate/test_mimetic.py:18: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________________ test_hdiv_element[BDM-1-DG-0] _________________________________________________________ hfamily = 'BDM', hdegree = 1, vfamily = 'DG', vdegree = 0 @pytest.mark.parametrize(('hfamily', 'hdegree', 'vfamily', 'vdegree'), [(f, d, vf, vd) for (vf, vd) in DG for (f, d) in hdiv] + [(f, d, vf, vd) for (vf, vd) in DG for (f, d) in hcurl] + [(f, d, vf, vd) for (vf, vd) in CG for (f, d) in DG]) def test_hdiv_element(hfamily, hdegree, vfamily, vdegree): > mesh = ExtrudedMesh(UnitSquareMesh(2, 2), layers=1, layer_height=0.25) tests/slate/test_mimetic.py:18: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________ test_hdiv_element[N1curl-1-DG-0] ________________________________________________________ hfamily = 'N1curl', hdegree = 1, vfamily = 'DG', vdegree = 0 @pytest.mark.parametrize(('hfamily', 'hdegree', 'vfamily', 'vdegree'), [(f, d, vf, vd) for (vf, vd) in DG for (f, d) in hdiv] + [(f, d, vf, vd) for (vf, vd) in DG for (f, d) in hcurl] + [(f, d, vf, vd) for (vf, vd) in CG for (f, d) in DG]) def test_hdiv_element(hfamily, hdegree, vfamily, vdegree): > mesh = ExtrudedMesh(UnitSquareMesh(2, 2), layers=1, layer_height=0.25) tests/slate/test_mimetic.py:18: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________ test_hdiv_element[N1curl-2-DG-0] ________________________________________________________ hfamily = 'N1curl', hdegree = 2, vfamily = 'DG', vdegree = 0 @pytest.mark.parametrize(('hfamily', 'hdegree', 'vfamily', 'vdegree'), [(f, d, vf, vd) for (vf, vd) in DG for (f, d) in hdiv] + [(f, d, vf, vd) for (vf, vd) in DG for (f, d) in hcurl] + [(f, d, vf, vd) for (vf, vd) in CG for (f, d) in DG]) def test_hdiv_element(hfamily, hdegree, vfamily, vdegree): > mesh = ExtrudedMesh(UnitSquareMesh(2, 2), layers=1, layer_height=0.25) tests/slate/test_mimetic.py:18: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________ test_hdiv_element[N2curl-1-DG-0] ________________________________________________________ hfamily = 'N2curl', hdegree = 1, vfamily = 'DG', vdegree = 0 @pytest.mark.parametrize(('hfamily', 'hdegree', 'vfamily', 'vdegree'), [(f, d, vf, vd) for (vf, vd) in DG for (f, d) in hdiv] + [(f, d, vf, vd) for (vf, vd) in DG for (f, d) in hcurl] + [(f, d, vf, vd) for (vf, vd) in CG for (f, d) in DG]) def test_hdiv_element(hfamily, hdegree, vfamily, vdegree): > mesh = ExtrudedMesh(UnitSquareMesh(2, 2), layers=1, layer_height=0.25) tests/slate/test_mimetic.py:18: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________ test_hdiv_element[N2curl-2-DG-0] ________________________________________________________ hfamily = 'N2curl', hdegree = 2, vfamily = 'DG', vdegree = 0 @pytest.mark.parametrize(('hfamily', 'hdegree', 'vfamily', 'vdegree'), [(f, d, vf, vd) for (vf, vd) in DG for (f, d) in hdiv] + [(f, d, vf, vd) for (vf, vd) in DG for (f, d) in hcurl] + [(f, d, vf, vd) for (vf, vd) in CG for (f, d) in DG]) def test_hdiv_element(hfamily, hdegree, vfamily, vdegree): > mesh = ExtrudedMesh(UnitSquareMesh(2, 2), layers=1, layer_height=0.25) tests/slate/test_mimetic.py:18: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________________ test_hdiv_element[DG-0-CG-1] __________________________________________________________ hfamily = 'DG', hdegree = 0, vfamily = 'CG', vdegree = 1 @pytest.mark.parametrize(('hfamily', 'hdegree', 'vfamily', 'vdegree'), [(f, d, vf, vd) for (vf, vd) in DG for (f, d) in hdiv] + [(f, d, vf, vd) for (vf, vd) in DG for (f, d) in hcurl] + [(f, d, vf, vd) for (vf, vd) in CG for (f, d) in DG]) def test_hdiv_element(hfamily, hdegree, vfamily, vdegree): > mesh = ExtrudedMesh(UnitSquareMesh(2, 2), layers=1, layer_height=0.25) tests/slate/test_mimetic.py:18: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________ test_hcurl_element[N1curl-1-CG-1] _______________________________________________________ hfamily = 'N1curl', hdegree = 1, vfamily = 'CG', vdegree = 1 @pytest.mark.parametrize(('hfamily', 'hdegree', 'vfamily', 'vdegree'), [(f, d, vf, vd) for (vf, vd) in CG for (f, d) in hcurl] + [(f, d, vf, vd) for (vf, vd) in CG for (f, d) in hdiv] + [(f, d, vf, vd) for (vf, vd) in DG for (f, d) in CG]) def test_hcurl_element(hfamily, hdegree, vfamily, vdegree): > mesh = ExtrudedMesh(UnitSquareMesh(2, 2), layers=1, layer_height=0.25) tests/slate/test_mimetic.py:42: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________ test_hcurl_element[N1curl-2-CG-1] _______________________________________________________ hfamily = 'N1curl', hdegree = 2, vfamily = 'CG', vdegree = 1 @pytest.mark.parametrize(('hfamily', 'hdegree', 'vfamily', 'vdegree'), [(f, d, vf, vd) for (vf, vd) in CG for (f, d) in hcurl] + [(f, d, vf, vd) for (vf, vd) in CG for (f, d) in hdiv] + [(f, d, vf, vd) for (vf, vd) in DG for (f, d) in CG]) def test_hcurl_element(hfamily, hdegree, vfamily, vdegree): > mesh = ExtrudedMesh(UnitSquareMesh(2, 2), layers=1, layer_height=0.25) tests/slate/test_mimetic.py:42: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________ test_hcurl_element[N2curl-1-CG-1] _______________________________________________________ hfamily = 'N2curl', hdegree = 1, vfamily = 'CG', vdegree = 1 @pytest.mark.parametrize(('hfamily', 'hdegree', 'vfamily', 'vdegree'), [(f, d, vf, vd) for (vf, vd) in CG for (f, d) in hcurl] + [(f, d, vf, vd) for (vf, vd) in CG for (f, d) in hdiv] + [(f, d, vf, vd) for (vf, vd) in DG for (f, d) in CG]) def test_hcurl_element(hfamily, hdegree, vfamily, vdegree): > mesh = ExtrudedMesh(UnitSquareMesh(2, 2), layers=1, layer_height=0.25) tests/slate/test_mimetic.py:42: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________ test_hcurl_element[N2curl-2-CG-1] _______________________________________________________ hfamily = 'N2curl', hdegree = 2, vfamily = 'CG', vdegree = 1 @pytest.mark.parametrize(('hfamily', 'hdegree', 'vfamily', 'vdegree'), [(f, d, vf, vd) for (vf, vd) in CG for (f, d) in hcurl] + [(f, d, vf, vd) for (vf, vd) in CG for (f, d) in hdiv] + [(f, d, vf, vd) for (vf, vd) in DG for (f, d) in CG]) def test_hcurl_element(hfamily, hdegree, vfamily, vdegree): > mesh = ExtrudedMesh(UnitSquareMesh(2, 2), layers=1, layer_height=0.25) tests/slate/test_mimetic.py:42: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________________ test_hcurl_element[RT-1-CG-1] _________________________________________________________ hfamily = 'RT', hdegree = 1, vfamily = 'CG', vdegree = 1 @pytest.mark.parametrize(('hfamily', 'hdegree', 'vfamily', 'vdegree'), [(f, d, vf, vd) for (vf, vd) in CG for (f, d) in hcurl] + [(f, d, vf, vd) for (vf, vd) in CG for (f, d) in hdiv] + [(f, d, vf, vd) for (vf, vd) in DG for (f, d) in CG]) def test_hcurl_element(hfamily, hdegree, vfamily, vdegree): > mesh = ExtrudedMesh(UnitSquareMesh(2, 2), layers=1, layer_height=0.25) tests/slate/test_mimetic.py:42: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________________ test_hcurl_element[BDM-1-CG-1] _________________________________________________________ hfamily = 'BDM', hdegree = 1, vfamily = 'CG', vdegree = 1 @pytest.mark.parametrize(('hfamily', 'hdegree', 'vfamily', 'vdegree'), [(f, d, vf, vd) for (vf, vd) in CG for (f, d) in hcurl] + [(f, d, vf, vd) for (vf, vd) in CG for (f, d) in hdiv] + [(f, d, vf, vd) for (vf, vd) in DG for (f, d) in CG]) def test_hcurl_element(hfamily, hdegree, vfamily, vdegree): > mesh = ExtrudedMesh(UnitSquareMesh(2, 2), layers=1, layer_height=0.25) tests/slate/test_mimetic.py:42: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________________ test_hcurl_element[CG-1-DG-0] _________________________________________________________ hfamily = 'CG', hdegree = 1, vfamily = 'DG', vdegree = 0 @pytest.mark.parametrize(('hfamily', 'hdegree', 'vfamily', 'vdegree'), [(f, d, vf, vd) for (vf, vd) in CG for (f, d) in hcurl] + [(f, d, vf, vd) for (vf, vd) in CG for (f, d) in hdiv] + [(f, d, vf, vd) for (vf, vd) in DG for (f, d) in CG]) def test_hcurl_element(hfamily, hdegree, vfamily, vdegree): > mesh = ExtrudedMesh(UnitSquareMesh(2, 2), layers=1, layer_height=0.25) tests/slate/test_mimetic.py:42: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_tensors_on_sphere[UnitIcosahedralSphereMesh-RT-1] _____________________________________________ Mesh = , hdiv_space = 'RT', degree = 1 @pytest.mark.parametrize(('Mesh', 'hdiv_space', 'degree'), [(UnitIcosahedralSphereMesh, 'RT', 1), (UnitIcosahedralSphereMesh, 'BDM', 1), (UnitCubedSphereMesh, 'RTCF', 1)]) def test_tensors_on_sphere(Mesh, hdiv_space, degree): mesh = Mesh(refinement_level=2) > mesh.init_cell_orientations(SpatialCoordinate(mesh)) tests/slate/test_orientations.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mesh.py:1203: in init_cell_orientations f.interpolate(ufl.dot(expr, ufl.cross(ReferenceGrad(x)[:, 0], ReferenceGrad(x)[:, 1]))) firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________________ test_tensors_on_sphere[UnitIcosahedralSphereMesh-BDM-1] ____________________________________________ Mesh = , hdiv_space = 'BDM', degree = 1 @pytest.mark.parametrize(('Mesh', 'hdiv_space', 'degree'), [(UnitIcosahedralSphereMesh, 'RT', 1), (UnitIcosahedralSphereMesh, 'BDM', 1), (UnitCubedSphereMesh, 'RTCF', 1)]) def test_tensors_on_sphere(Mesh, hdiv_space, degree): mesh = Mesh(refinement_level=2) > mesh.init_cell_orientations(SpatialCoordinate(mesh)) tests/slate/test_orientations.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mesh.py:1203: in init_cell_orientations f.interpolate(ufl.dot(expr, ufl.cross(ReferenceGrad(x)[:, 0], ReferenceGrad(x)[:, 1]))) firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________ test_tensors_on_sphere[UnitCubedSphereMesh-RTCF-1] _______________________________________________ Mesh = , hdiv_space = 'RTCF', degree = 1 @pytest.mark.parametrize(('Mesh', 'hdiv_space', 'degree'), [(UnitIcosahedralSphereMesh, 'RT', 1), (UnitIcosahedralSphereMesh, 'BDM', 1), (UnitCubedSphereMesh, 'RTCF', 1)]) def test_tensors_on_sphere(Mesh, hdiv_space, degree): mesh = Mesh(refinement_level=2) > mesh.init_cell_orientations(SpatialCoordinate(mesh)) tests/slate/test_orientations.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mesh.py:1203: in init_cell_orientations f.interpolate(ufl.dot(expr, ufl.cross(ReferenceGrad(x)[:, 0], ReferenceGrad(x)[:, 1]))) firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________ test_functions[False-f-1-function-scalar] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = 'f', value = 1, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________ test_functions[False-f-1-function-vector] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = 'f', value = 1, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________ test_functions[False-f-1-function-tensor] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = 'f', value = 1, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________ test_functions[False-f-1-constant-scalar] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = 'f', value = 1, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________ test_functions[False-f-1-constant-vector] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = 'f', value = 1, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________ test_functions[False-f-1-constant-tensor] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = 'f', value = 1, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_functions[False-f-10-function-scalar] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = 'f', value = 10, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_functions[False-f-10-function-vector] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = 'f', value = 10, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_functions[False-f-10-function-tensor] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = 'f', value = 10, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_functions[False-f-10-constant-scalar] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = 'f', value = 10, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_functions[False-f-10-constant-vector] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = 'f', value = 10, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_functions[False-f-10-constant-tensor] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = 'f', value = 10, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_functions[False-f--1-function-scalar] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = 'f', value = -1, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_functions[False-f--1-function-vector] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = 'f', value = -1, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_functions[False-f--1-function-tensor] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = 'f', value = -1, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_functions[False-f--1-constant-scalar] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = 'f', value = -1, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_functions[False-f--1-constant-vector] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = 'f', value = -1, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_functions[False-f--1-constant-tensor] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = 'f', value = -1, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_functions[False-f--10-function-scalar] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = 'f', value = -10, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_functions[False-f--10-function-vector] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = 'f', value = -10, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_functions[False-f--10-function-tensor] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = 'f', value = -10, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_functions[False-f--10-constant-scalar] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = 'f', value = -10, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_functions[False-f--10-constant-vector] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = 'f', value = -10, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_functions[False-f--10-constant-tensor] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = 'f', value = -10, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_functions[False-2.0*tanh(f) + cos(f) + sin(f)-1-function-scalar] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = 1 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_functions[False-2.0*tanh(f) + cos(f) + sin(f)-1-function-vector] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = 1 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_functions[False-2.0*tanh(f) + cos(f) + sin(f)-1-function-tensor] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = 1 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_functions[False-2.0*tanh(f) + cos(f) + sin(f)-1-constant-scalar] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = 1 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_functions[False-2.0*tanh(f) + cos(f) + sin(f)-1-constant-vector] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = 1 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_functions[False-2.0*tanh(f) + cos(f) + sin(f)-1-constant-tensor] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = 1 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_functions[False-2.0*tanh(f) + cos(f) + sin(f)-10-function-scalar] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = 10 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_functions[False-2.0*tanh(f) + cos(f) + sin(f)-10-function-vector] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = 10 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_functions[False-2.0*tanh(f) + cos(f) + sin(f)-10-function-tensor] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = 10 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_functions[False-2.0*tanh(f) + cos(f) + sin(f)-10-constant-scalar] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = 10 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_functions[False-2.0*tanh(f) + cos(f) + sin(f)-10-constant-vector] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = 10 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_functions[False-2.0*tanh(f) + cos(f) + sin(f)-10-constant-tensor] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = 10 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_functions[False-2.0*tanh(f) + cos(f) + sin(f)--1-function-scalar] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = -1 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_functions[False-2.0*tanh(f) + cos(f) + sin(f)--1-function-vector] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = -1 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_functions[False-2.0*tanh(f) + cos(f) + sin(f)--1-function-tensor] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = -1 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_functions[False-2.0*tanh(f) + cos(f) + sin(f)--1-constant-scalar] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = -1 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_functions[False-2.0*tanh(f) + cos(f) + sin(f)--1-constant-vector] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = -1 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_functions[False-2.0*tanh(f) + cos(f) + sin(f)--1-constant-tensor] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = -1 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_functions[False-2.0*tanh(f) + cos(f) + sin(f)--10-function-scalar] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = -10 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_functions[False-2.0*tanh(f) + cos(f) + sin(f)--10-function-vector] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = -10 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_functions[False-2.0*tanh(f) + cos(f) + sin(f)--10-function-tensor] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = -10 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_functions[False-2.0*tanh(f) + cos(f) + sin(f)--10-constant-scalar] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = -10 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_functions[False-2.0*tanh(f) + cos(f) + sin(f)--10-constant-vector] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = -10 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_functions[False-2.0*tanh(f) + cos(f) + sin(f)--10-constant-tensor] ____________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = -10 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_functions[False-1.0/tanh(f) + 1.0/f-1-function-scalar] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_functions[False-1.0/tanh(f) + 1.0/f-1-function-vector] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_functions[False-1.0/tanh(f) + 1.0/f-1-function-tensor] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_functions[False-1.0/tanh(f) + 1.0/f-1-constant-scalar] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_functions[False-1.0/tanh(f) + 1.0/f-1-constant-vector] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_functions[False-1.0/tanh(f) + 1.0/f-1-constant-tensor] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_functions[False-1.0/tanh(f) + 1.0/f-10-function-scalar] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_functions[False-1.0/tanh(f) + 1.0/f-10-function-vector] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_functions[False-1.0/tanh(f) + 1.0/f-10-function-tensor] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_functions[False-1.0/tanh(f) + 1.0/f-10-constant-scalar] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_functions[False-1.0/tanh(f) + 1.0/f-10-constant-vector] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_functions[False-1.0/tanh(f) + 1.0/f-10-constant-tensor] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_functions[False-1.0/tanh(f) + 1.0/f--1-function-scalar] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_functions[False-1.0/tanh(f) + 1.0/f--1-function-vector] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_functions[False-1.0/tanh(f) + 1.0/f--1-function-tensor] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_functions[False-1.0/tanh(f) + 1.0/f--1-constant-scalar] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_functions[False-1.0/tanh(f) + 1.0/f--1-constant-vector] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_functions[False-1.0/tanh(f) + 1.0/f--1-constant-tensor] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_functions[False-1.0/tanh(f) + 1.0/f--10-function-scalar] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_functions[False-1.0/tanh(f) + 1.0/f--10-function-vector] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_functions[False-1.0/tanh(f) + 1.0/f--10-function-tensor] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_functions[False-1.0/tanh(f) + 1.0/f--10-constant-scalar] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_functions[False-1.0/tanh(f) + 1.0/f--10-constant-vector] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_functions[False-1.0/tanh(f) + 1.0/f--10-constant-tensor] _________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36590), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________ test_functions[True-f-1-function-scalar] ____________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = 'f', value = 1, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________ test_functions[True-f-1-function-vector] ____________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = 'f', value = 1, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________ test_functions[True-f-1-function-tensor] ____________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = 'f', value = 1, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________ test_functions[True-f-1-constant-scalar] ____________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = 'f', value = 1, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________ test_functions[True-f-1-constant-vector] ____________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = 'f', value = 1, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________ test_functions[True-f-1-constant-tensor] ____________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = 'f', value = 1, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________ test_functions[True-f-10-function-scalar] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = 'f', value = 10, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________ test_functions[True-f-10-function-vector] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = 'f', value = 10, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________ test_functions[True-f-10-function-tensor] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = 'f', value = 10, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________ test_functions[True-f-10-constant-scalar] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = 'f', value = 10, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________ test_functions[True-f-10-constant-vector] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = 'f', value = 10, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________ test_functions[True-f-10-constant-tensor] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = 'f', value = 10, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________ test_functions[True-f--1-function-scalar] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = 'f', value = -1, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________ test_functions[True-f--1-function-vector] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = 'f', value = -1, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________ test_functions[True-f--1-function-tensor] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = 'f', value = -1, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________ test_functions[True-f--1-constant-scalar] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = 'f', value = -1, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________ test_functions[True-f--1-constant-vector] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = 'f', value = -1, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________ test_functions[True-f--1-constant-tensor] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = 'f', value = -1, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_functions[True-f--10-function-scalar] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = 'f', value = -10, typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_functions[True-f--10-function-vector] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = 'f', value = -10, typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_functions[True-f--10-function-tensor] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = 'f', value = -10, typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_functions[True-f--10-constant-scalar] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = 'f', value = -10, typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_functions[True-f--10-constant-vector] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = 'f', value = -10, typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_functions[True-f--10-constant-tensor] ___________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = 'f', value = -10, typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_functions[True-2.0*tanh(f) + cos(f) + sin(f)-1-function-scalar] ______________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = 1 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_functions[True-2.0*tanh(f) + cos(f) + sin(f)-1-function-vector] ______________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = 1 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_functions[True-2.0*tanh(f) + cos(f) + sin(f)-1-function-tensor] ______________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = 1 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_functions[True-2.0*tanh(f) + cos(f) + sin(f)-1-constant-scalar] ______________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = 1 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_functions[True-2.0*tanh(f) + cos(f) + sin(f)-1-constant-vector] ______________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = 1 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_functions[True-2.0*tanh(f) + cos(f) + sin(f)-1-constant-tensor] ______________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = 1 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_functions[True-2.0*tanh(f) + cos(f) + sin(f)-10-function-scalar] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = 10 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_functions[True-2.0*tanh(f) + cos(f) + sin(f)-10-function-vector] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = 10 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_functions[True-2.0*tanh(f) + cos(f) + sin(f)-10-function-tensor] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = 10 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_functions[True-2.0*tanh(f) + cos(f) + sin(f)-10-constant-scalar] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = 10 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_functions[True-2.0*tanh(f) + cos(f) + sin(f)-10-constant-vector] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = 10 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_functions[True-2.0*tanh(f) + cos(f) + sin(f)-10-constant-tensor] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = 10 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_functions[True-2.0*tanh(f) + cos(f) + sin(f)--1-function-scalar] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = -1 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_functions[True-2.0*tanh(f) + cos(f) + sin(f)--1-function-vector] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = -1 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_functions[True-2.0*tanh(f) + cos(f) + sin(f)--1-function-tensor] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = -1 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_functions[True-2.0*tanh(f) + cos(f) + sin(f)--1-constant-scalar] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = -1 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_functions[True-2.0*tanh(f) + cos(f) + sin(f)--1-constant-vector] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = -1 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________ test_functions[True-2.0*tanh(f) + cos(f) + sin(f)--1-constant-tensor] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = -1 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_functions[True-2.0*tanh(f) + cos(f) + sin(f)--10-function-scalar] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = -10 typ = 'function', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_functions[True-2.0*tanh(f) + cos(f) + sin(f)--10-function-vector] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = -10 typ = 'function', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_functions[True-2.0*tanh(f) + cos(f) + sin(f)--10-function-tensor] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = -10 typ = 'function', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_functions[True-2.0*tanh(f) + cos(f) + sin(f)--10-constant-scalar] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = -10 typ = 'constant', fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_functions[True-2.0*tanh(f) + cos(f) + sin(f)--10-constant-vector] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = -10 typ = 'constant', fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ____________________________________ test_functions[True-2.0*tanh(f) + cos(f) + sin(f)--10-constant-tensor] _____________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '2.0*tanh(f) + cos(f) + sin(f)', value = -10 typ = 'constant', fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_functions[True-1.0/tanh(f) + 1.0/f-1-function-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_functions[True-1.0/tanh(f) + 1.0/f-1-function-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_functions[True-1.0/tanh(f) + 1.0/f-1-function-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_functions[True-1.0/tanh(f) + 1.0/f-1-constant-scalar] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_functions[True-1.0/tanh(f) + 1.0/f-1-constant-vector] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_functions[True-1.0/tanh(f) + 1.0/f-1-constant-tensor] ___________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '1.0/tanh(f) + 1.0/f', value = 1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_functions[True-1.0/tanh(f) + 1.0/f-10-function-scalar] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_functions[True-1.0/tanh(f) + 1.0/f-10-function-vector] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_functions[True-1.0/tanh(f) + 1.0/f-10-function-tensor] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_functions[True-1.0/tanh(f) + 1.0/f-10-constant-scalar] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_functions[True-1.0/tanh(f) + 1.0/f-10-constant-vector] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_functions[True-1.0/tanh(f) + 1.0/f-10-constant-tensor] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '1.0/tanh(f) + 1.0/f', value = 10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_functions[True-1.0/tanh(f) + 1.0/f--1-function-scalar] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_functions[True-1.0/tanh(f) + 1.0/f--1-function-vector] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_functions[True-1.0/tanh(f) + 1.0/f--1-function-tensor] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_functions[True-1.0/tanh(f) + 1.0/f--1-constant-scalar] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_functions[True-1.0/tanh(f) + 1.0/f--1-constant-vector] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________ test_functions[True-1.0/tanh(f) + 1.0/f--1-constant-tensor] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '1.0/tanh(f) + 1.0/f', value = -1, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_functions[True-1.0/tanh(f) + 1.0/f--10-function-scalar] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'function' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_functions[True-1.0/tanh(f) + 1.0/f--10-function-vector] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'function' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_functions[True-1.0/tanh(f) + 1.0/f--10-function-tensor] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'function' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) > f.assign(value) tests/slate/test_scalar_tensors.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_functions[True-1.0/tanh(f) + 1.0/f--10-constant-scalar] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'constant' fs_type = 'scalar' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_functions[True-1.0/tanh(f) + 1.0/f--10-constant-vector] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'constant' fs_type = 'vector' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________ test_functions[True-1.0/tanh(f) + 1.0/f--10-constant-tensor] __________________________________________ mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36664), expr = '1.0/tanh(f) + 1.0/f', value = -10, typ = 'constant' fs_type = 'tensor' @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'], itertools.product(['f', '2.0*tanh(f) + cos(f) + sin(f)', '1.0/tanh(f) + 1.0/f'], [1, 10, -1, -10], ['function', 'constant'], ['scalar', 'vector', 'tensor'])) def test_functions(mesh, expr, value, typ, fs_type): if typ == 'function': if fs_type == "vector": V = VectorFunctionSpace(mesh, 'CG', 1) elif fs_type == "tensor": V = TensorFunctionSpace(mesh, 'CG', 1) else: V = FunctionSpace(mesh, 'CG', 1) f = Function(V) f.assign(value) if fs_type == "vector": f = dot(f, f) elif fs_type == "tensor": f = inner(f, f) elif typ == 'constant': if fs_type == "vector": f = Constant([value, value], domain=mesh) f = dot(f, f) elif fs_type == "tensor": f = Constant([[value, value], [value, value]], domain=mesh) f = inner(f, f) else: f = Constant(value, domain=mesh) > actual = assemble(Tensor(eval(expr)*dx)) tests/slate/test_scalar_tensors.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:111: in assemble m = l() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ___________________________________________________________ test_constant_one_tensor ____________________________________________________________ def test_constant_one_tensor(): > mesh = ExtrudedMesh(UnitIntervalMesh(5), 5) tests/slate/test_scalar_tensors_extr.py:7: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________________ test_parallel_kernel_on_sphere _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError _____________________________________________________ test_slate_hybridization[1-RT-False] ______________________________________________________ degree = 1, hdiv_family = 'RT', quadrilateral = False @pytest.mark.parametrize(("degree", "hdiv_family", "quadrilateral"), [(1, "RT", False), (1, "RTCF", True), (2, "RT", False), (2, "RTCF", True)]) def test_slate_hybridization(degree, hdiv_family, quadrilateral): # Create a mesh mesh = UnitSquareMesh(6, 6, quadrilateral=quadrilateral) RT = FunctionSpace(mesh, hdiv_family, degree) DG = FunctionSpace(mesh, "DG", degree - 1) W = RT * DG sigma, u = TrialFunctions(W) tau, v = TestFunctions(W) n = FacetNormal(mesh) # Define the source function f = Function(DG) x, y = SpatialCoordinate(mesh) > f.interpolate((1+8*pi*pi)*sin(x*pi*2)*sin(y*pi*2)) tests/slate/test_slate_hybridization.py:45: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________ test_slate_hybridization[1-RTCF-True] _____________________________________________________ degree = 1, hdiv_family = 'RTCF', quadrilateral = True @pytest.mark.parametrize(("degree", "hdiv_family", "quadrilateral"), [(1, "RT", False), (1, "RTCF", True), (2, "RT", False), (2, "RTCF", True)]) def test_slate_hybridization(degree, hdiv_family, quadrilateral): # Create a mesh mesh = UnitSquareMesh(6, 6, quadrilateral=quadrilateral) RT = FunctionSpace(mesh, hdiv_family, degree) DG = FunctionSpace(mesh, "DG", degree - 1) W = RT * DG sigma, u = TrialFunctions(W) tau, v = TestFunctions(W) n = FacetNormal(mesh) # Define the source function f = Function(DG) x, y = SpatialCoordinate(mesh) > f.interpolate((1+8*pi*pi)*sin(x*pi*2)*sin(y*pi*2)) tests/slate/test_slate_hybridization.py:45: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________ test_slate_hybridization[2-RT-False] ______________________________________________________ degree = 2, hdiv_family = 'RT', quadrilateral = False @pytest.mark.parametrize(("degree", "hdiv_family", "quadrilateral"), [(1, "RT", False), (1, "RTCF", True), (2, "RT", False), (2, "RTCF", True)]) def test_slate_hybridization(degree, hdiv_family, quadrilateral): # Create a mesh mesh = UnitSquareMesh(6, 6, quadrilateral=quadrilateral) RT = FunctionSpace(mesh, hdiv_family, degree) DG = FunctionSpace(mesh, "DG", degree - 1) W = RT * DG sigma, u = TrialFunctions(W) tau, v = TestFunctions(W) n = FacetNormal(mesh) # Define the source function f = Function(DG) x, y = SpatialCoordinate(mesh) > f.interpolate((1+8*pi*pi)*sin(x*pi*2)*sin(y*pi*2)) tests/slate/test_slate_hybridization.py:45: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________ test_slate_hybridization[2-RTCF-True] _____________________________________________________ degree = 2, hdiv_family = 'RTCF', quadrilateral = True @pytest.mark.parametrize(("degree", "hdiv_family", "quadrilateral"), [(1, "RT", False), (1, "RTCF", True), (2, "RT", False), (2, "RTCF", True)]) def test_slate_hybridization(degree, hdiv_family, quadrilateral): # Create a mesh mesh = UnitSquareMesh(6, 6, quadrilateral=quadrilateral) RT = FunctionSpace(mesh, hdiv_family, degree) DG = FunctionSpace(mesh, "DG", degree - 1) W = RT * DG sigma, u = TrialFunctions(W) tau, v = TestFunctions(W) n = FacetNormal(mesh) # Define the source function f = Function(DG) x, y = SpatialCoordinate(mesh) > f.interpolate((1+8*pi*pi)*sin(x*pi*2)*sin(y*pi*2)) tests/slate/test_slate_hybridization.py:45: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________ test_hybrid_extr_helmholtz[False] _______________________________________________________ quad = False @pytest.mark.parametrize('quad', [False, True]) def test_hybrid_extr_helmholtz(quad): """Hybridize the lowest order HDiv conforming method using both triangular prism and hexahedron elements. """ base = UnitSquareMesh(5, 5, quadrilateral=quad) > mesh = ExtrudedMesh(base, layers=5, layer_height=0.2) tests/slate/test_slate_hybridization_extr.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________ test_hybrid_extr_helmholtz[True] ________________________________________________________ quad = True @pytest.mark.parametrize('quad', [False, True]) def test_hybrid_extr_helmholtz(quad): """Hybridize the lowest order HDiv conforming method using both triangular prism and hexahedron elements. """ base = UnitSquareMesh(5, 5, quadrilateral=quad) > mesh = ExtrudedMesh(base, layers=5, layer_height=0.2) tests/slate/test_slate_hybridization_extr.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_slate_hybridized_on_boundary[1-RT-False] _________________________________________________ degree = 1, hdiv_family = 'RT', quadrilateral = False @pytest.mark.parametrize(("degree", "hdiv_family", "quadrilateral"), [(1, "RT", False), (1, "RTCF", True), (2, "RT", False), (2, "RTCF", True)]) def test_slate_hybridized_on_boundary(degree, hdiv_family, quadrilateral): # Create a mesh mesh = UnitSquareMesh(6, 6, quadrilateral=quadrilateral) RT = FunctionSpace(mesh, hdiv_family, degree) DG = FunctionSpace(mesh, "DG", degree - 1) W = RT * DG sigma, u = TrialFunctions(W) tau, v = TestFunctions(W) # Define the source function f = Function(DG) x, y = SpatialCoordinate(mesh) > f.interpolate((1+8*pi*pi)*cos(x*pi*2)*cos(y*pi*2)) tests/slate/test_slate_hybridized_mixed_bcs.py:20: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_slate_hybridized_on_boundary[1-RTCF-True] _________________________________________________ degree = 1, hdiv_family = 'RTCF', quadrilateral = True @pytest.mark.parametrize(("degree", "hdiv_family", "quadrilateral"), [(1, "RT", False), (1, "RTCF", True), (2, "RT", False), (2, "RTCF", True)]) def test_slate_hybridized_on_boundary(degree, hdiv_family, quadrilateral): # Create a mesh mesh = UnitSquareMesh(6, 6, quadrilateral=quadrilateral) RT = FunctionSpace(mesh, hdiv_family, degree) DG = FunctionSpace(mesh, "DG", degree - 1) W = RT * DG sigma, u = TrialFunctions(W) tau, v = TestFunctions(W) # Define the source function f = Function(DG) x, y = SpatialCoordinate(mesh) > f.interpolate((1+8*pi*pi)*cos(x*pi*2)*cos(y*pi*2)) tests/slate/test_slate_hybridized_mixed_bcs.py:20: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_slate_hybridized_on_boundary[2-RT-False] _________________________________________________ degree = 2, hdiv_family = 'RT', quadrilateral = False @pytest.mark.parametrize(("degree", "hdiv_family", "quadrilateral"), [(1, "RT", False), (1, "RTCF", True), (2, "RT", False), (2, "RTCF", True)]) def test_slate_hybridized_on_boundary(degree, hdiv_family, quadrilateral): # Create a mesh mesh = UnitSquareMesh(6, 6, quadrilateral=quadrilateral) RT = FunctionSpace(mesh, hdiv_family, degree) DG = FunctionSpace(mesh, "DG", degree - 1) W = RT * DG sigma, u = TrialFunctions(W) tau, v = TestFunctions(W) # Define the source function f = Function(DG) x, y = SpatialCoordinate(mesh) > f.interpolate((1+8*pi*pi)*cos(x*pi*2)*cos(y*pi*2)) tests/slate/test_slate_hybridized_mixed_bcs.py:20: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________ test_slate_hybridized_on_boundary[2-RTCF-True] _________________________________________________ degree = 2, hdiv_family = 'RTCF', quadrilateral = True @pytest.mark.parametrize(("degree", "hdiv_family", "quadrilateral"), [(1, "RT", False), (1, "RTCF", True), (2, "RT", False), (2, "RTCF", True)]) def test_slate_hybridized_on_boundary(degree, hdiv_family, quadrilateral): # Create a mesh mesh = UnitSquareMesh(6, 6, quadrilateral=quadrilateral) RT = FunctionSpace(mesh, hdiv_family, degree) DG = FunctionSpace(mesh, "DG", degree - 1) W = RT * DG sigma, u = TrialFunctions(W) tau, v = TestFunctions(W) # Define the source function f = Function(DG) x, y = SpatialCoordinate(mesh) > f.interpolate((1+8*pi*pi)*cos(x*pi*2)*cos(y*pi*2)) tests/slate/test_slate_hybridized_mixed_bcs.py:20: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_slate_hybridized_extruded_bcs[1-RTCF] ___________________________________________________ degree = 1, hdiv_family = 'RTCF' @pytest.mark.parametrize(("degree", "hdiv_family"), [(1, "RTCF"), (2, "RTCF")]) def test_slate_hybridized_extruded_bcs(degree, hdiv_family): # Create a mesh m = UnitIntervalMesh(6) > mesh = ExtrudedMesh(m, 6) tests/slate/test_slate_hybridized_mixed_bcs.py:62: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_slate_hybridized_extruded_bcs[2-RTCF] ___________________________________________________ degree = 2, hdiv_family = 'RTCF' @pytest.mark.parametrize(("degree", "hdiv_family"), [(1, "RTCF"), (2, "RTCF")]) def test_slate_hybridized_extruded_bcs(degree, hdiv_family): # Create a mesh m = UnitIntervalMesh(6) > mesh = ExtrudedMesh(m, 6) tests/slate/test_slate_hybridized_mixed_bcs.py:62: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in ExtrudedMesh ??? ../PyOP2/pyop2/profiling.py:60: in wrapper return f(*args, **kwargs) firedrake/mesh.py:1481: in ExtrudedMesh layer_height, extrusion_type=extrusion_type, kernel=kernel) firedrake/extrusion_utils.py:158: in make_extruded_coords pass_layer_arg=True) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________________ test_illegal_add_sub ______________________________________________________________ def test_illegal_add_sub(): mesh = UnitSquareMesh(1, 1) V = FunctionSpace(mesh, "CG", 1) u = TrialFunction(V) v = TestFunction(V) A = Tensor(u * v * dx) b = Tensor(v * dx) c = Function(V) > c.interpolate(Constant(1)) tests/slate/test_slate_infrastructure.py:309: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________ test_2d_facet_subdomains[False-1] _______________________________________________________ mesh_2d = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36929), subdomain = 1 @pytest.mark.parametrize("subdomain", (1, 2, 3, 4)) def test_2d_facet_subdomains(mesh_2d, subdomain): DG = VectorFunctionSpace(mesh_2d, "DG", 1) n = FacetNormal(mesh_2d) u = TestFunction(DG) x, y = SpatialCoordinate(mesh_2d) > f = project(as_vector([x, y]), DG) tests/slate/test_subdomains.py:31: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:189: in rhs self.assembler() firedrake/assemble.py:162: in thunk kernel() ../PyOP2/pyop2/base.py:1765: in zero loop.enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________ test_2d_facet_subdomains[False-2] _______________________________________________________ mesh_2d = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36929), subdomain = 2 @pytest.mark.parametrize("subdomain", (1, 2, 3, 4)) def test_2d_facet_subdomains(mesh_2d, subdomain): DG = VectorFunctionSpace(mesh_2d, "DG", 1) n = FacetNormal(mesh_2d) u = TestFunction(DG) x, y = SpatialCoordinate(mesh_2d) > f = project(as_vector([x, y]), DG) tests/slate/test_subdomains.py:31: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:189: in rhs self.assembler() firedrake/assemble.py:162: in thunk kernel() ../PyOP2/pyop2/base.py:1765: in zero loop.enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________ test_2d_facet_subdomains[False-3] _______________________________________________________ mesh_2d = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36929), subdomain = 3 @pytest.mark.parametrize("subdomain", (1, 2, 3, 4)) def test_2d_facet_subdomains(mesh_2d, subdomain): DG = VectorFunctionSpace(mesh_2d, "DG", 1) n = FacetNormal(mesh_2d) u = TestFunction(DG) x, y = SpatialCoordinate(mesh_2d) > f = project(as_vector([x, y]), DG) tests/slate/test_subdomains.py:31: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:189: in rhs self.assembler() firedrake/assemble.py:162: in thunk kernel() ../PyOP2/pyop2/base.py:1765: in zero loop.enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________ test_2d_facet_subdomains[False-4] _______________________________________________________ mesh_2d = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36929), subdomain = 4 @pytest.mark.parametrize("subdomain", (1, 2, 3, 4)) def test_2d_facet_subdomains(mesh_2d, subdomain): DG = VectorFunctionSpace(mesh_2d, "DG", 1) n = FacetNormal(mesh_2d) u = TestFunction(DG) x, y = SpatialCoordinate(mesh_2d) > f = project(as_vector([x, y]), DG) tests/slate/test_subdomains.py:31: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:189: in rhs self.assembler() firedrake/assemble.py:162: in thunk kernel() ../PyOP2/pyop2/base.py:1765: in zero loop.enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ______________________________________________________ test_multiple_subdomains_2d[False] _______________________________________________________ mesh_2d = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 36929) def test_multiple_subdomains_2d(mesh_2d): DG = VectorFunctionSpace(mesh_2d, "DG", 1) n = FacetNormal(mesh_2d) u = TestFunction(DG) x, y = SpatialCoordinate(mesh_2d) > f = project(as_vector([x, y]), DG) tests/slate/test_subdomains.py:80: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:189: in rhs self.assembler() firedrake/assemble.py:162: in thunk kernel() ../PyOP2/pyop2/base.py:1765: in zero loop.enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________ test_2d_facet_subdomains[True-1] ________________________________________________________ mesh_2d = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36941), subdomain = 1 @pytest.mark.parametrize("subdomain", (1, 2, 3, 4)) def test_2d_facet_subdomains(mesh_2d, subdomain): DG = VectorFunctionSpace(mesh_2d, "DG", 1) n = FacetNormal(mesh_2d) u = TestFunction(DG) x, y = SpatialCoordinate(mesh_2d) > f = project(as_vector([x, y]), DG) tests/slate/test_subdomains.py:31: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:189: in rhs self.assembler() firedrake/assemble.py:162: in thunk kernel() ../PyOP2/pyop2/base.py:1765: in zero loop.enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________ test_2d_facet_subdomains[True-2] ________________________________________________________ mesh_2d = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36941), subdomain = 2 @pytest.mark.parametrize("subdomain", (1, 2, 3, 4)) def test_2d_facet_subdomains(mesh_2d, subdomain): DG = VectorFunctionSpace(mesh_2d, "DG", 1) n = FacetNormal(mesh_2d) u = TestFunction(DG) x, y = SpatialCoordinate(mesh_2d) > f = project(as_vector([x, y]), DG) tests/slate/test_subdomains.py:31: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:189: in rhs self.assembler() firedrake/assemble.py:162: in thunk kernel() ../PyOP2/pyop2/base.py:1765: in zero loop.enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________ test_2d_facet_subdomains[True-3] ________________________________________________________ mesh_2d = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36941), subdomain = 3 @pytest.mark.parametrize("subdomain", (1, 2, 3, 4)) def test_2d_facet_subdomains(mesh_2d, subdomain): DG = VectorFunctionSpace(mesh_2d, "DG", 1) n = FacetNormal(mesh_2d) u = TestFunction(DG) x, y = SpatialCoordinate(mesh_2d) > f = project(as_vector([x, y]), DG) tests/slate/test_subdomains.py:31: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:189: in rhs self.assembler() firedrake/assemble.py:162: in thunk kernel() ../PyOP2/pyop2/base.py:1765: in zero loop.enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________ test_2d_facet_subdomains[True-4] ________________________________________________________ mesh_2d = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36941), subdomain = 4 @pytest.mark.parametrize("subdomain", (1, 2, 3, 4)) def test_2d_facet_subdomains(mesh_2d, subdomain): DG = VectorFunctionSpace(mesh_2d, "DG", 1) n = FacetNormal(mesh_2d) u = TestFunction(DG) x, y = SpatialCoordinate(mesh_2d) > f = project(as_vector([x, y]), DG) tests/slate/test_subdomains.py:31: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:189: in rhs self.assembler() firedrake/assemble.py:162: in thunk kernel() ../PyOP2/pyop2/base.py:1765: in zero loop.enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________ test_multiple_subdomains_2d[True] _______________________________________________________ mesh_2d = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 36941) def test_multiple_subdomains_2d(mesh_2d): DG = VectorFunctionSpace(mesh_2d, "DG", 1) n = FacetNormal(mesh_2d) u = TestFunction(DG) x, y = SpatialCoordinate(mesh_2d) > f = project(as_vector([x, y]), DG) tests/slate/test_subdomains.py:80: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:189: in rhs self.assembler() firedrake/assemble.py:162: in thunk kernel() ../PyOP2/pyop2/base.py:1765: in zero loop.enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_3d_facet_subdomains[1] __________________________________________________________ mesh_3d = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 36953), subdomain = 1 @pytest.mark.parametrize("subdomain", (1, 2, 3, 4, 5, 6)) def test_3d_facet_subdomains(mesh_3d, subdomain): DG = VectorFunctionSpace(mesh_3d, "DG", 1) n = FacetNormal(mesh_3d) u = TestFunction(DG) x, y, z = SpatialCoordinate(mesh_3d) > f = project(as_vector([x, y, z]), DG) tests/slate/test_subdomains.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:189: in rhs self.assembler() firedrake/assemble.py:162: in thunk kernel() ../PyOP2/pyop2/base.py:1765: in zero loop.enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_3d_facet_subdomains[2] __________________________________________________________ mesh_3d = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 36953), subdomain = 2 @pytest.mark.parametrize("subdomain", (1, 2, 3, 4, 5, 6)) def test_3d_facet_subdomains(mesh_3d, subdomain): DG = VectorFunctionSpace(mesh_3d, "DG", 1) n = FacetNormal(mesh_3d) u = TestFunction(DG) x, y, z = SpatialCoordinate(mesh_3d) > f = project(as_vector([x, y, z]), DG) tests/slate/test_subdomains.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:189: in rhs self.assembler() firedrake/assemble.py:162: in thunk kernel() ../PyOP2/pyop2/base.py:1765: in zero loop.enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_3d_facet_subdomains[3] __________________________________________________________ mesh_3d = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 36953), subdomain = 3 @pytest.mark.parametrize("subdomain", (1, 2, 3, 4, 5, 6)) def test_3d_facet_subdomains(mesh_3d, subdomain): DG = VectorFunctionSpace(mesh_3d, "DG", 1) n = FacetNormal(mesh_3d) u = TestFunction(DG) x, y, z = SpatialCoordinate(mesh_3d) > f = project(as_vector([x, y, z]), DG) tests/slate/test_subdomains.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:189: in rhs self.assembler() firedrake/assemble.py:162: in thunk kernel() ../PyOP2/pyop2/base.py:1765: in zero loop.enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_3d_facet_subdomains[4] __________________________________________________________ mesh_3d = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 36953), subdomain = 4 @pytest.mark.parametrize("subdomain", (1, 2, 3, 4, 5, 6)) def test_3d_facet_subdomains(mesh_3d, subdomain): DG = VectorFunctionSpace(mesh_3d, "DG", 1) n = FacetNormal(mesh_3d) u = TestFunction(DG) x, y, z = SpatialCoordinate(mesh_3d) > f = project(as_vector([x, y, z]), DG) tests/slate/test_subdomains.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:189: in rhs self.assembler() firedrake/assemble.py:162: in thunk kernel() ../PyOP2/pyop2/base.py:1765: in zero loop.enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_3d_facet_subdomains[5] __________________________________________________________ mesh_3d = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 36953), subdomain = 5 @pytest.mark.parametrize("subdomain", (1, 2, 3, 4, 5, 6)) def test_3d_facet_subdomains(mesh_3d, subdomain): DG = VectorFunctionSpace(mesh_3d, "DG", 1) n = FacetNormal(mesh_3d) u = TestFunction(DG) x, y, z = SpatialCoordinate(mesh_3d) > f = project(as_vector([x, y, z]), DG) tests/slate/test_subdomains.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:189: in rhs self.assembler() firedrake/assemble.py:162: in thunk kernel() ../PyOP2/pyop2/base.py:1765: in zero loop.enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_3d_facet_subdomains[6] __________________________________________________________ mesh_3d = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 36953), subdomain = 6 @pytest.mark.parametrize("subdomain", (1, 2, 3, 4, 5, 6)) def test_3d_facet_subdomains(mesh_3d, subdomain): DG = VectorFunctionSpace(mesh_3d, "DG", 1) n = FacetNormal(mesh_3d) u = TestFunction(DG) x, y, z = SpatialCoordinate(mesh_3d) > f = project(as_vector([x, y, z]), DG) tests/slate/test_subdomains.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:189: in rhs self.assembler() firedrake/assemble.py:162: in thunk kernel() ../PyOP2/pyop2/base.py:1765: in zero loop.enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________________ test_multiple_subdomains_3d __________________________________________________________ mesh_3d = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 36953) def test_multiple_subdomains_3d(mesh_3d): DG = VectorFunctionSpace(mesh_3d, "DG", 1) n = FacetNormal(mesh_3d) u = TestFunction(DG) x, y, z = SpatialCoordinate(mesh_3d) > f = project(as_vector([x, y, z]), DG) tests/slate/test_subdomains.py:97: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:189: in rhs self.assembler() firedrake/assemble.py:162: in thunk kernel() ../PyOP2/pyop2/base.py:1765: in zero loop.enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _______________________________________________________________ test_unary_minus ________________________________________________________________ def test_unary_minus(): mesh = UnitSquareMesh(1, 1) V = FunctionSpace(mesh, "CG", 1) uh = Function(V) v = TestFunction(V) u = TrialFunction(V) A = Tensor(u*v*dx) B = Tensor(uh*v*dx) > uh.assign(1) tests/slate/test_unaryop_precedence.py:20: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ :2: in assign ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/function.py:377: in assign assemble_expressions.Assign(self, expr), subset) :2: in evaluate_expression ??? firedrake/utils.py:58: in wrapper return f(*args, **kwargs) firedrake/assemble_expressions.py:509: in evaluate_expression evaluate_preprocessed_expression(k, args, subset) firedrake/assemble_expressions.py:459: in evaluate_preprocessed_expression op2.par_loop(kernel, itset, *parloop_args) ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________________ test_lvp_equiv_hdg[1] _____________________________________________________________ degree = 1 @pytest.mark.parametrize('degree', [1, 2]) def test_lvp_equiv_hdg(degree): """Runs an HDG problem and checks that passing a Slate-defined problem into a variational problem produces the same result for the traces as solving the whole system using built-in and tested solvers and preconditioners. """ mesh = UnitSquareMesh(5, 5) x = SpatialCoordinate(mesh) n = FacetNormal(mesh) U = VectorFunctionSpace(mesh, "DG", degree) V = FunctionSpace(mesh, "DG", degree) T = FunctionSpace(mesh, "HDiv Trace", degree) W = U * V * T s = Function(W) q, u, uhat = TrialFunctions(W) v, w, mu = TestFunctions(W) > f = Function(V).interpolate(-div(grad(sin(pi*x[0])*sin(pi*x[1])))) tests/slate/test_variational_prb.py:28: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________________ test_lvp_equiv_hdg[2] _____________________________________________________________ degree = 2 @pytest.mark.parametrize('degree', [1, 2]) def test_lvp_equiv_hdg(degree): """Runs an HDG problem and checks that passing a Slate-defined problem into a variational problem produces the same result for the traces as solving the whole system using built-in and tested solvers and preconditioners. """ mesh = UnitSquareMesh(5, 5) x = SpatialCoordinate(mesh) n = FacetNormal(mesh) U = VectorFunctionSpace(mesh, "DG", degree) V = FunctionSpace(mesh, "DG", degree) T = FunctionSpace(mesh, "HDiv Trace", degree) W = U * V * T s = Function(W) q, u, uhat = TrialFunctions(W) v, w, mu = TestFunctions(W) > f = Function(V).interpolate(-div(grad(sin(pi*x[0])*sin(pi*x[1])))) tests/slate/test_variational_prb.py:28: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________________ test_assemble_zany_tensor[M2] _________________________________________________________ mass_matrix = Matrix(Form([Integral(Product(Argument(WithGeometry(FunctionSpace( M = assemble(mass_matrix) tests/slate/test_zany_element_tensors.py:36: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:516: in _assemble o = m.cell_sizes ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/mesh.py:1055: in cell_sizes return project(CellSize(self), P1) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:158: in apply_massinv return self.solver.solve ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:144: in solver return firedrake.LinearSolver(self.A, solver_parameters=self.solver_parameters) ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:139: in A form_compiler_parameters=self.form_compiler_parameters) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________________ test_assemble_zany_tensor[H3] _________________________________________________________ mass_matrix = Matrix(Form([Integral(Product(Argument(WithGeometry(FunctionSpace( M = assemble(mass_matrix) tests/slate/test_zany_element_tensors.py:36: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:516: in _assemble o = m.cell_sizes ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/mesh.py:1055: in cell_sizes return project(CellSize(self), P1) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:158: in apply_massinv return self.solver.solve ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:144: in solver return firedrake.LinearSolver(self.A, solver_parameters=self.solver_parameters) ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:139: in A form_compiler_parameters=self.form_compiler_parameters) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________________ test_assemble_zany_tensor[B5] _________________________________________________________ mass_matrix = Matrix(Form([Integral(Product(Argument(WithGeometry(FunctionSpace( M = assemble(mass_matrix) tests/slate/test_zany_element_tensors.py:36: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:516: in _assemble o = m.cell_sizes ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/mesh.py:1055: in cell_sizes return project(CellSize(self), P1) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:158: in apply_massinv return self.solver.solve ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:144: in solver return firedrake.LinearSolver(self.A, solver_parameters=self.solver_parameters) ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:139: in A form_compiler_parameters=self.form_compiler_parameters) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________________ test_assemble_zany_tensor[A5] _________________________________________________________ mass_matrix = Matrix(Form([Integral(Product(Argument(WithGeometry(FunctionSpace( M = assemble(mass_matrix) tests/slate/test_zany_element_tensors.py:36: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:516: in _assemble o = m.cell_sizes ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/mesh.py:1055: in cell_sizes return project(CellSize(self), P1) firedrake/projection.py:90: in project use_slate_for_inverse=use_slate_for_inverse).project() firedrake/projection.py:169: in project self.apply_massinv(self.target, self.rhs) firedrake/projection.py:158: in apply_massinv return self.solver.solve ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:144: in solver return firedrake.LinearSolver(self.A, solver_parameters=self.solver_parameters) ../PyOP2/pyop2/utils.py:62: in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) firedrake/projection.py:139: in A form_compiler_parameters=self.form_compiler_parameters) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[2-CG-CG-1-1] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37003), family_A = 'CG', family_B = 'CG', degree_A = 1, degree_B = 1 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[2-CG-CG-1-2] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37007), family_A = 'CG', family_B = 'CG', degree_A = 1, degree_B = 2 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[2-CG-CG-2-1] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37012), family_A = 'CG', family_B = 'CG', degree_A = 2, degree_B = 1 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[2-CG-CG-2-2] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37016), family_A = 'CG', family_B = 'CG', degree_A = 2, degree_B = 2 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[2-CG-DG-1-0] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37023), family_A = 'CG', family_B = 'DG', degree_A = 1, degree_B = 0 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[2-CG-DG-1-1] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37027), family_A = 'CG', family_B = 'DG', degree_A = 1, degree_B = 1 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[2-CG-DG-1-2] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37031), family_A = 'CG', family_B = 'DG', degree_A = 1, degree_B = 2 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[2-CG-DG-2-0] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37035), family_A = 'CG', family_B = 'DG', degree_A = 2, degree_B = 0 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[2-CG-DG-2-1] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37039), family_A = 'CG', family_B = 'DG', degree_A = 2, degree_B = 1 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[2-CG-DG-2-2] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37043), family_A = 'CG', family_B = 'DG', degree_A = 2, degree_B = 2 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[2-DG-CG-0-1] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37048), family_A = 'DG', family_B = 'CG', degree_A = 0, degree_B = 1 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[2-DG-CG-0-2] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37052), family_A = 'DG', family_B = 'CG', degree_A = 0, degree_B = 2 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[2-DG-CG-1-1] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37057), family_A = 'DG', family_B = 'CG', degree_A = 1, degree_B = 1 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[2-DG-CG-1-2] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37061), family_A = 'DG', family_B = 'CG', degree_A = 1, degree_B = 2 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[2-DG-CG-2-1] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37066), family_A = 'DG', family_B = 'CG', degree_A = 2, degree_B = 1 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[2-DG-CG-2-2] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37070), family_A = 'DG', family_B = 'CG', degree_A = 2, degree_B = 2 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[2-DG-DG-0-0] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37074), family_A = 'DG', family_B = 'DG', degree_A = 0, degree_B = 0 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[2-DG-DG-0-1] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37078), family_A = 'DG', family_B = 'DG', degree_A = 0, degree_B = 1 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[2-DG-DG-0-2] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37082), family_A = 'DG', family_B = 'DG', degree_A = 0, degree_B = 2 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[2-DG-DG-1-0] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37086), family_A = 'DG', family_B = 'DG', degree_A = 1, degree_B = 0 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[2-DG-DG-1-1] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37090), family_A = 'DG', family_B = 'DG', degree_A = 1, degree_B = 1 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[2-DG-DG-1-2] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37094), family_A = 'DG', family_B = 'DG', degree_A = 1, degree_B = 2 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[2-DG-DG-2-0] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37098), family_A = 'DG', family_B = 'DG', degree_A = 2, degree_B = 0 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[2-DG-DG-2-1] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37102), family_A = 'DG', family_B = 'DG', degree_A = 2, degree_B = 1 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[2-DG-DG-2-2] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37106), family_A = 'DG', family_B = 'DG', degree_A = 2, degree_B = 2 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[3-CG-CG-1-1] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37114), family_A = 'CG', family_B = 'CG', degree_A = 1, degree_B = 1 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[3-CG-CG-1-2] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37118), family_A = 'CG', family_B = 'CG', degree_A = 1, degree_B = 2 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[3-CG-CG-2-1] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37123), family_A = 'CG', family_B = 'CG', degree_A = 2, degree_B = 1 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[3-CG-CG-2-2] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37127), family_A = 'CG', family_B = 'CG', degree_A = 2, degree_B = 2 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[3-CG-DG-1-0] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37134), family_A = 'CG', family_B = 'DG', degree_A = 1, degree_B = 0 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[3-CG-DG-1-1] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37138), family_A = 'CG', family_B = 'DG', degree_A = 1, degree_B = 1 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[3-CG-DG-1-2] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37142), family_A = 'CG', family_B = 'DG', degree_A = 1, degree_B = 2 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[3-CG-DG-2-0] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37146), family_A = 'CG', family_B = 'DG', degree_A = 2, degree_B = 0 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[3-CG-DG-2-1] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37150), family_A = 'CG', family_B = 'DG', degree_A = 2, degree_B = 1 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[3-CG-DG-2-2] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37154), family_A = 'CG', family_B = 'DG', degree_A = 2, degree_B = 2 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[3-DG-CG-0-1] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37159), family_A = 'DG', family_B = 'CG', degree_A = 0, degree_B = 1 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[3-DG-CG-0-2] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37163), family_A = 'DG', family_B = 'CG', degree_A = 0, degree_B = 2 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[3-DG-CG-1-1] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37168), family_A = 'DG', family_B = 'CG', degree_A = 1, degree_B = 1 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[3-DG-CG-1-2] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37172), family_A = 'DG', family_B = 'CG', degree_A = 1, degree_B = 2 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[3-DG-CG-2-1] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37177), family_A = 'DG', family_B = 'CG', degree_A = 2, degree_B = 1 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[3-DG-CG-2-2] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37181), family_A = 'DG', family_B = 'CG', degree_A = 2, degree_B = 2 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[3-DG-DG-0-0] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37185), family_A = 'DG', family_B = 'DG', degree_A = 0, degree_B = 0 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[3-DG-DG-0-1] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37189), family_A = 'DG', family_B = 'DG', degree_A = 0, degree_B = 1 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[3-DG-DG-0-2] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37193), family_A = 'DG', family_B = 'DG', degree_A = 0, degree_B = 2 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[3-DG-DG-1-0] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37197), family_A = 'DG', family_B = 'DG', degree_A = 1, degree_B = 0 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[3-DG-DG-1-1] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37201), family_A = 'DG', family_B = 'DG', degree_A = 1, degree_B = 1 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[3-DG-DG-1-2] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37205), family_A = 'DG', family_B = 'DG', degree_A = 1, degree_B = 2 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[3-DG-DG-2-0] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37209), family_A = 'DG', family_B = 'DG', degree_A = 2, degree_B = 0 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[3-DG-DG-2-1] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37213), family_A = 'DG', family_B = 'DG', degree_A = 2, degree_B = 1 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _________________________________________________ test_assemble_mixed_mass_matrix[3-DG-DG-2-2] __________________________________________________ mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37217), family_A = 'DG', family_B = 'DG', degree_A = 2, degree_B = 2 def test_assemble_mixed_mass_matrix(mesh, family_A, family_B, degree_A, degree_B): mesh_A = mesh mesh_B = mesh if degree_A == 0 and family_A != "DG": return if degree_B == 0 and family_B != "DG": return ele_A = FiniteElement(family_A, mesh_A.ufl_cell(), degree_A) V_A = FunctionSpace(mesh_A, ele_A) ele_B = FiniteElement(family_B, mesh_B.ufl_cell(), degree_B) V_B = FunctionSpace(mesh_B, ele_B) > M = assemble_mixed_mass_matrix(V_A, V_B) tests/supermesh/test_assemble_mixed_mass_matrix.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/supermeshing.py:181: in assemble_mixed_mass_matrix M_SS = assemble(inner(TrialFunction(V_S_A), TestFunction(V_S_B)) * dx) firedrake/assemble.py:105: in assemble loops = tuple(loops) firedrake/assemble.py:606: in _assemble yield tensor.assemble() ../PyOP2/pyop2/base.py:3379: in assemble read=True, write=True).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[2-scalar-CG1-CG1] ___________________________________________________ V = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37222)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Lagrange', triangle, 1) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37221) shapify = . at 0x7f3cbb6add90>, A = ('CG', 1), B = ('CG', 1) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[2-scalar-CG1-CG2] ___________________________________________________ V = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', triangle, 2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37229)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Lagrange', triangle, 2) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37228) shapify = . at 0x7f3cbb198488>, A = ('CG', 1), B = ('CG', 2) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[2-scalar-CG2-CG2] ___________________________________________________ V = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', triangle, 2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37236)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Lagrange', triangle, 2) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37235) shapify = . at 0x7f3cbb198b70>, A = ('CG', 2), B = ('CG', 2) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[2-scalar-DG0-DG0] ___________________________________________________ V = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', triangle, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37243)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Discontinuous Lagrange', triangle, 0) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37242) shapify = . at 0x7f3cbb4d6e18>, A = ('DG', 0), B = ('DG', 0) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[2-scalar-DG0-DG1] ___________________________________________________ V = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37250)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Discontinuous Lagrange', triangle, 1) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37249) shapify = . at 0x7f3cbb4d6ea0>, A = ('DG', 0), B = ('DG', 1) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[2-scalar-DG0-DG2] ___________________________________________________ V = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', triangle, 2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37257)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Discontinuous Lagrange', triangle, 2) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37256) shapify = . at 0x7f3cbb4a2268>, A = ('DG', 0), B = ('DG', 2) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[2-scalar-DG1-DG1] ___________________________________________________ V = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', triangle, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37264)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Discontinuous Lagrange', triangle, 1) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37263) shapify = . at 0x7f3cbb4a2620>, A = ('DG', 1), B = ('DG', 1) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[2-scalar-DG1-DG2] ___________________________________________________ V = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', triangle, 2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37271)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Discontinuous Lagrange', triangle, 2) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37270) shapify = . at 0x7f3cbb1ae9d8>, A = ('DG', 1), B = ('DG', 2) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[2-scalar-DG2-DG2] ___________________________________________________ V = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', triangle, 2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37278)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Discontinuous Lagrange', triangle, 2) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37277) shapify = . at 0x7f3cbb2c3400>, A = ('DG', 2), B = ('DG', 2) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[2-vector-CG1-CG1] ___________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37285)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Lagrange', triangle, 1) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37284) shapify = , A = ('CG', 1), B = ('CG', 1) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[2-vector-CG1-CG2] ___________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 2), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37292)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Lagrange', triangle, 2) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37291) shapify = , A = ('CG', 1), B = ('CG', 2) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[2-vector-CG2-CG2] ___________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', triangle, 2), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37299)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Lagrange', triangle, 2) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37298) shapify = , A = ('CG', 2), B = ('CG', 2) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[2-vector-DG0-DG0] ___________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Discon...Lagrange', triangle, 0), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37306)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Discontinuous Lagrange', triangle, 0) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37305) shapify = , A = ('DG', 0), B = ('DG', 0) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[2-vector-DG0-DG1] ___________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Discon...Lagrange', triangle, 1), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37313)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Discontinuous Lagrange', triangle, 1) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37312) shapify = , A = ('DG', 0), B = ('DG', 1) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[2-vector-DG0-DG2] ___________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Discon...Lagrange', triangle, 2), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37320)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Discontinuous Lagrange', triangle, 2) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37319) shapify = , A = ('DG', 0), B = ('DG', 2) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[2-vector-DG1-DG1] ___________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Discon...Lagrange', triangle, 1), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37327)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Discontinuous Lagrange', triangle, 1) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37326) shapify = , A = ('DG', 1), B = ('DG', 1) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[2-vector-DG1-DG2] ___________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Discon...Lagrange', triangle, 2), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37334)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Discontinuous Lagrange', triangle, 2) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37333) shapify = , A = ('DG', 1), B = ('DG', 2) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[2-vector-DG2-DG2] ___________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Discon...Lagrange', triangle, 2), dim=2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37341)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Discontinuous Lagrange', triangle, 2) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 37340) shapify = , A = ('DG', 2), B = ('DG', 2) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[3-scalar-CG1-CG1] ___________________________________________________ V = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', tetrahedron, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37348)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Lagrange', tetrahedron, 1) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37347) shapify = . at 0x7f3cbb3239d8>, A = ('CG', 1), B = ('CG', 1) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[3-scalar-CG1-CG2] ___________________________________________________ V = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', tetrahedron, 2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37355)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Lagrange', tetrahedron, 2) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37354) shapify = . at 0x7f3cbabdca60>, A = ('CG', 1), B = ('CG', 2) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[3-scalar-CG2-CG2] ___________________________________________________ V = WithGeometry(FunctionSpace(, FiniteElement('Lagrange', tetrahedron, 2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37362)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Lagrange', tetrahedron, 2) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37361) shapify = . at 0x7f3cbb5ed840>, A = ('CG', 2), B = ('CG', 2) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[3-scalar-DG0-DG0] ___________________________________________________ V = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', tetrahedron, 0), name=None), Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37369)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Discontinuous Lagrange', tetrahedron, 0) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37368) shapify = . at 0x7f3cbb189840>, A = ('DG', 0), B = ('DG', 0) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[3-scalar-DG0-DG1] ___________________________________________________ V = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', tetrahedron, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37376)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Discontinuous Lagrange', tetrahedron, 1) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37375) shapify = . at 0x7f3cbabdc7b8>, A = ('DG', 0), B = ('DG', 1) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[3-scalar-DG0-DG2] ___________________________________________________ V = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', tetrahedron, 2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37383)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Discontinuous Lagrange', tetrahedron, 2) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37382) shapify = . at 0x7f3cbaf0f510>, A = ('DG', 0), B = ('DG', 2) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[3-scalar-DG1-DG1] ___________________________________________________ V = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', tetrahedron, 1), name=None), Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37390)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Discontinuous Lagrange', tetrahedron, 1) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37389) shapify = . at 0x7f3cbb4b3ae8>, A = ('DG', 1), B = ('DG', 1) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[3-scalar-DG1-DG2] ___________________________________________________ V = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', tetrahedron, 2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37397)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Discontinuous Lagrange', tetrahedron, 2) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37396) shapify = . at 0x7f3cbb47e8c8>, A = ('DG', 1), B = ('DG', 2) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[3-scalar-DG2-DG2] ___________________________________________________ V = WithGeometry(FunctionSpace(, FiniteElement('Discontinuous Lagrange', tetrahedron, 2), name=None), Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37404)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Discontinuous Lagrange', tetrahedron, 2) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37403) shapify = . at 0x7f3cbb4b3bf8>, A = ('DG', 2), B = ('DG', 2) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[3-vector-CG1-CG1] ___________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), name=None), Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37411)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Lagrange', tetrahedron, 1) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37410) shapify = , A = ('CG', 1), B = ('CG', 1) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[3-vector-CG1-CG2] ___________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', tetrahedron, 2), dim=3), name=None), Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37418)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Lagrange', tetrahedron, 2) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37417) shapify = , A = ('CG', 1), B = ('CG', 2) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[3-vector-CG2-CG2] ___________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Lagrange', tetrahedron, 2), dim=3), name=None), Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37425)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Lagrange', tetrahedron, 2) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37424) shapify = , A = ('CG', 2), B = ('CG', 2) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[3-vector-DG0-DG0] ___________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Discon...ge', tetrahedron, 0), dim=3), name=None), Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37432)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Discontinuous Lagrange', tetrahedron, 0) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37431) shapify = , A = ('DG', 0), B = ('DG', 0) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[3-vector-DG0-DG1] ___________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Discon...ge', tetrahedron, 1), dim=3), name=None), Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37439)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Discontinuous Lagrange', tetrahedron, 1) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37438) shapify = , A = ('DG', 0), B = ('DG', 1) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[3-vector-DG0-DG2] ___________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Discon...ge', tetrahedron, 2), dim=3), name=None), Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37446)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Discontinuous Lagrange', tetrahedron, 2) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37445) shapify = , A = ('DG', 0), B = ('DG', 2) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[3-vector-DG1-DG1] ___________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Discon...ge', tetrahedron, 1), dim=3), name=None), Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37453)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Discontinuous Lagrange', tetrahedron, 1) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37452) shapify = , A = ('DG', 1), B = ('DG', 1) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[3-vector-DG1-DG2] ___________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Discon...ge', tetrahedron, 2), dim=3), name=None), Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37460)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Discontinuous Lagrange', tetrahedron, 2) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37459) shapify = , A = ('DG', 1), B = ('DG', 2) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError __________________________________________________ test_galerkin_projection[3-vector-DG2-DG2] ___________________________________________________ V = WithGeometry(FunctionSpace(, VectorElement(FiniteElement('Discon...ge', tetrahedron, 2), dim=3), name=None), Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37467)) def physical_node_locations(V): element = V.ufl_element() if element.value_shape(): assert isinstance(element, (ufl.VectorElement, ufl.TensorElement)) element = element.sub_elements()[0] mesh = V.mesh() cache = mesh._shared_data_cache["hierarchy_physical_node_locations"] key = element try: > return cache[key] E KeyError: FiniteElement('Discontinuous Lagrange', tetrahedron, 2) firedrake/mg/utils.py:140: KeyError During handling of the above exception, another exception occurred: mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 37466) shapify = , A = ('DG', 2), B = ('DG', 2) def test_galerkin_projection(mesh, shapify, A, B): family_A, degree_A = A family_B, degree_B = B base = mesh mh = MeshHierarchy(base, 1) mesh_A = mh[-2] mesh_B = mh[-1] ele_A = shapify(FiniteElement(family_A, mesh_A.ufl_cell(), degree_A)) V_A = FunctionSpace(mesh_A, ele_A) ele_B = shapify(FiniteElement(family_B, mesh_B.ufl_cell(), degree_B)) V_B = FunctionSpace(mesh_B, ele_B) f_A = Function(V_A) with f_A.dat.vec_wo as x: x.setRandom() f_B_prolong = Function(V_B) > prolong(f_A, f_B_prolong) tests/supermesh/test_galerkin_projection.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/mg/interface.py:70: in prolong node_locations = utils.physical_node_locations(Vf) firedrake/mg/utils.py:143: in physical_node_locations locations = firedrake.interpolate(firedrake.SpatialCoordinate(mesh), Vc) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________________ test_project[CG1-CG1] _____________________________________________________________ hierarchy = , coarse = ('CG', 1), fine = ('CG', 1) def test_project(hierarchy, coarse, fine): cmesh, fmesh = hierarchy Vc = FunctionSpace(cmesh, *coarse) Vf = FunctionSpace(fmesh, *fine) c = Function(Vc) > c.interpolate(SpatialCoordinate(cmesh)**2) tests/supermesh/test_nonnested_project.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________________ test_project[CG1-CG2] _____________________________________________________________ hierarchy = , coarse = ('CG', 1), fine = ('CG', 2) def test_project(hierarchy, coarse, fine): cmesh, fmesh = hierarchy Vc = FunctionSpace(cmesh, *coarse) Vf = FunctionSpace(fmesh, *fine) c = Function(Vc) > c.interpolate(SpatialCoordinate(cmesh)**2) tests/supermesh/test_nonnested_project.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________________ test_project[CG1-DG1] _____________________________________________________________ hierarchy = , coarse = ('CG', 1), fine = ('DG', 1) def test_project(hierarchy, coarse, fine): cmesh, fmesh = hierarchy Vc = FunctionSpace(cmesh, *coarse) Vf = FunctionSpace(fmesh, *fine) c = Function(Vc) > c.interpolate(SpatialCoordinate(cmesh)**2) tests/supermesh/test_nonnested_project.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________________ test_project[CG2-CG2] _____________________________________________________________ hierarchy = , coarse = ('CG', 2), fine = ('CG', 2) def test_project(hierarchy, coarse, fine): cmesh, fmesh = hierarchy Vc = FunctionSpace(cmesh, *coarse) Vf = FunctionSpace(fmesh, *fine) c = Function(Vc) > c.interpolate(SpatialCoordinate(cmesh)**2) tests/supermesh/test_nonnested_project.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________________ test_project[DG0-CG1] _____________________________________________________________ hierarchy = , coarse = ('DG', 0), fine = ('CG', 1) def test_project(hierarchy, coarse, fine): cmesh, fmesh = hierarchy Vc = FunctionSpace(cmesh, *coarse) Vf = FunctionSpace(fmesh, *fine) c = Function(Vc) > c.interpolate(SpatialCoordinate(cmesh)**2) tests/supermesh/test_nonnested_project.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________________ test_project[DG0-CG2] _____________________________________________________________ hierarchy = , coarse = ('DG', 0), fine = ('CG', 2) def test_project(hierarchy, coarse, fine): cmesh, fmesh = hierarchy Vc = FunctionSpace(cmesh, *coarse) Vf = FunctionSpace(fmesh, *fine) c = Function(Vc) > c.interpolate(SpatialCoordinate(cmesh)**2) tests/supermesh/test_nonnested_project.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________________ test_project[DG0-DG0] _____________________________________________________________ hierarchy = , coarse = ('DG', 0), fine = ('DG', 0) def test_project(hierarchy, coarse, fine): cmesh, fmesh = hierarchy Vc = FunctionSpace(cmesh, *coarse) Vf = FunctionSpace(fmesh, *fine) c = Function(Vc) > c.interpolate(SpatialCoordinate(cmesh)**2) tests/supermesh/test_nonnested_project.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________________ test_project[DG0-DG1] _____________________________________________________________ hierarchy = , coarse = ('DG', 0), fine = ('DG', 1) def test_project(hierarchy, coarse, fine): cmesh, fmesh = hierarchy Vc = FunctionSpace(cmesh, *coarse) Vf = FunctionSpace(fmesh, *fine) c = Function(Vc) > c.interpolate(SpatialCoordinate(cmesh)**2) tests/supermesh/test_nonnested_project.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________________ test_project[DG1-CG1] _____________________________________________________________ hierarchy = , coarse = ('DG', 1), fine = ('CG', 1) def test_project(hierarchy, coarse, fine): cmesh, fmesh = hierarchy Vc = FunctionSpace(cmesh, *coarse) Vf = FunctionSpace(fmesh, *fine) c = Function(Vc) > c.interpolate(SpatialCoordinate(cmesh)**2) tests/supermesh/test_nonnested_project.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________________ test_project[DG1-CG2] _____________________________________________________________ hierarchy = , coarse = ('DG', 1), fine = ('CG', 2) def test_project(hierarchy, coarse, fine): cmesh, fmesh = hierarchy Vc = FunctionSpace(cmesh, *coarse) Vf = FunctionSpace(fmesh, *fine) c = Function(Vc) > c.interpolate(SpatialCoordinate(cmesh)**2) tests/supermesh/test_nonnested_project.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError _____________________________________________________________ test_project[DG1-DG1] _____________________________________________________________ hierarchy = , coarse = ('DG', 1), fine = ('DG', 1) def test_project(hierarchy, coarse, fine): cmesh, fmesh = hierarchy Vc = FunctionSpace(cmesh, *coarse) Vf = FunctionSpace(fmesh, *fine) c = Function(Vc) > c.interpolate(SpatialCoordinate(cmesh)**2) tests/supermesh/test_nonnested_project.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ firedrake/function.py:349: in interpolate return interpolation.interpolate(expression, self, subset=subset) firedrake/interpolation.py:37: in interpolate return Interpolator(expr, V, subset=subset, access=access).interpolate() :2: in interpolate ??? firedrake/utils.py:61: in wrapper return f(*args, **kwargs) firedrake/interpolation.py:65: in interpolate return self.callable() firedrake/interpolation.py:101: in callable l() ../PyOP2/pyop2/base.py:4011: in par_loop return _make_object('ParLoop', kernel, iterset, *args, **kwargs).enqueue() ../PyOP2/pyop2/base.py:102: in enqueue _trace.append(self) ../PyOP2/pyop2/base.py:125: in append self.evaluate_all() ../PyOP2/pyop2/base.py:142: in evaluate_all comp._run() ../PyOP2/pyop2/base.py:3746: in _run return self.compute() ../PyOP2/pyop2/base.py:3789: in compute self.global_to_local_begin() ../PyOP2/pyop2/base.py:3824: in global_to_local_begin arg.global_to_local_begin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Arg(Dat(DataSet(Set((10201, 10201, 10201), 'set_9724'), (2,), 'None_nodes_dset'), None, dtype('float64'), 'Coordinates...et((20000, 20000, 20000), 'Cells'), Set((10201, 10201, 10201), 'set_9724'), 3, None, 'None_cell_node'), Access('READ')) @collective def global_to_local_begin(self): """Begin halo exchange for the argument if a halo update is required. Doing halo exchanges only makes sense for :class:`Dat` objects. """ assert self._is_dat, "Doing halo exchanges only makes sense for Dats" assert not self._in_flight, \ > "Halo exchange already in flight for Arg %s" % self E AssertionError: Halo exchange already in flight for Arg OP2 Arg: dat OP2 Dat: Coordinates on (OP2 DataSet: None_nodes_dset on set OP2 Set: set_9724 with size 10201, with dim (2,)) with datatype float64, map OP2 Map: None_cell_node from (OP2 Set: Cells with size 20000) to (OP2 Set: set_9724 with size 10201) with arity 3, access OP2 Access: READ ../PyOP2/pyop2/base.py:449: AssertionError ________________________________________________________ test_project_parallel[CG1-CG1] _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_project_parallel[CG1-CG2] _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_project_parallel[CG1-DG1] _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_project_parallel[CG2-CG2] _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_project_parallel[DG0-CG1] _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_project_parallel[DG0-CG2] _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_project_parallel[DG0-DG0] _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_project_parallel[DG0-DG1] _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_project_parallel[DG1-CG1] _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_project_parallel[DG1-CG2] _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_project_parallel[DG1-DG1] _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_project_parallel[CG1-CG1] _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_project_parallel[CG1-CG2] _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_project_parallel[CG1-DG1] _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_project_parallel[CG2-CG2] _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_project_parallel[DG0-CG1] _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_project_parallel[DG0-CG2] _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_project_parallel[DG0-DG0] _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_project_parallel[DG0-DG1] _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_project_parallel[DG1-CG1] _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_project_parallel[DG1-CG2] _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError ________________________________________________________ test_project_parallel[DG1-DG1] _________________________________________________________ item = def pytest_runtest_call(item): if item.get_closest_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test > parallel(item) tests/conftest.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/conftest.py:26: in parallel check_call(call) /usr/lib/python3.6/subprocess.py:306: in check_call retcode = call(*popenargs, **kwargs) /usr/lib/python3.6/subprocess.py:287: in call with Popen(*popenargs, **kwargs) as p: /usr/lib/python3.6/subprocess.py:729: in __init__ restore_signals, start_new_session) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ['mpiexec', '-n', '1', 'python', '-m', 'pytest', ...], executable = b'mpiexec' preexec_fn = None, close_fds = True, pass_fds = (), cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = -1 p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] else: args = list(args) if shell: args = ["/bin/sh", "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) E OSError: [Errno 12] Cannot allocate memory /usr/lib/python3.6/subprocess.py:1295: OSError =============================================================== warnings summary ================================================================ /home/simone/firedrake/lib/python3.6/site-packages/_pytest/mark/structures.py:337 /home/simone/firedrake/lib/python3.6/site-packages/_pytest/mark/structures.py:337: PytestUnknownMarkWarning: Unknown pytest.mark.benchmark - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html PytestUnknownMarkWarning, tests/regression/test_bcs.py::test_preassembly_change_bcs[FunctionSpace-False-matfree] tests/regression/test_bcs.py::test_preassembly_change_bcs[FunctionSpace-True-matfree] tests/regression/test_bcs.py::test_preassembly_change_bcs[VectorFunctionSpace-True-matfree] tests/regression/test_bcs.py::test_preassembly_change_bcs[VectorFunctionSpace-False-matfree] tests/regression/test_matrix_free.py::test_matrixfree_action[scalar-Poisson-no bcs] tests/regression/test_matrix_free.py::test_matrixfree_action[scalar-Poisson-bcs] tests/regression/test_matrix_free.py::test_matrixfree_action[scalar-Mass-no bcs] tests/regression/test_matrix_free.py::test_matrixfree_action[scalar-Mass-bcs] tests/regression/test_matrix_free.py::test_matrixfree_action[vector-Poisson-no bcs] tests/regression/test_matrix_free.py::test_matrixfree_action[vector-Poisson-bcs] tests/regression/test_matrix_free.py::test_matrixfree_action[vector-Mass-no bcs] tests/regression/test_matrix_free.py::test_matrixfree_action[vector-Mass-bcs] tests/regression/test_matrix_free.py::test_fieldsplitting[parameters0-preassembled] tests/regression/test_matrix_free.py::test_fieldsplitting[parameters1-preassembled] tests/regression/test_matrix_free.py::test_fieldsplitting[parameters2-preassembled] tests/regression/test_matrix_free.py::test_fieldsplitting[parameters3-preassembled] tests/regression/test_matrix_free.py::test_matrix_free_preassembly_change_bcs /home/simone/firedrake/src/firedrake/firedrake/assemble.py:105: DeprecationWarning: generator '_assemble' raised StopIteration loops = tuple(loops) -- Docs: https://docs.pytest.org/en/latest/warnings.html ========================== 2402 failed, 2912 passed, 58 skipped, 8 xfailed, 18 warnings, 160 error in 3202.21 seconds =========================== Makefile:64: recipe for target 'test' failed make: *** [test] Error 1